3 ms·
GCC doesn't actually follow GNU conventions since it has both single hyphen and double hyphen long options.
by kevin_thibedeau 5y ago
GCC doesn't actually follow GNU conventions since it has both single hyphen and double hyphen long options.
- mort96 5y agoI suspect GCC thinks of its options as mainly single-option short options and double-hyphen long options. It's reasonable to interpret things like `-funsafe-math-optimizations` to mean option `-f` with argument `unsafe-math-optimizations`, just like how `-Dfoo` means option `-D` with argument `foo`. Unless you were thinking about something else.
- kevin_thibedeau 5y agoJust go through the docs. They have a ton of single hyphen long opts that aren't a letter with argument.
- mort96 5y agoHuh, you're right. I had never noticed options like `-gen-decls` or `-nostdinc` before. I also should've thought of `-static`. Yeah, that's weird. Also, I just noticed: they have `-nostdinc` for C, but the C++ equivalent is `-nostdinc++`, which looks like "no stdin C++".