Hacker News new | past | comments | ask | show | jobs | submit login

GCC doesn't actually follow GNU conventions since it has both single hyphen and double hyphen long options.



I 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.


Just go through the docs. They have a ton of single hyphen long opts that aren't a letter with argument.


Huh, 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++".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: