J
James Kanze
Right, just found that. So it seems that for C++ -ansi *is* actually
equivalent to -std=c++98.
At present. What will it mean when they also support
-std=c++03?
Right, just found that. So it seems that for C++ -ansi *is* actually
equivalent to -std=c++98.
i want to create some console programme,
]
Note: the "-std=c++98 -pedantic" flags ensure that you are compiling
according to the current C++ standard without any GCC-specific
extensions/ restrictions to the language.
Note that the "-std=c++98 -pedantic" flags only affect the compiler, and
do *not* ensure that you are not including non-standard headers or
linking against non-standard libraries.
At present. What will it mean when they also support -std=c++03?
Who knows? Maybe then the g++ default will be -std=gnu++03' which will be
the same as -std=c++03 plus GNU extensions and if -ansi removes those
extensions you'll be left with -std=c++03?
Maybe they should have a flag -std=c++latest-supported (and then make
that the sodding default, rather than forcing you to mess about to get
standard behaviour).
[...]Note that the "-std=c++98 -pedantic" flags only affect the compiler, andNote: the "-std=c++98 -pedantic" flags ensure that you are compiling
according to the current C++ standard without any GCC-specific
extensions/ restrictions to the language.
do *not* ensure that you are not including non-standard headers or
linking against non-standard libraries.
No indeed, they only specify the *language* standard that the compiler
should respect.
[...]
To summarise: the only way to ensure that you are not including non-
standard headers or linking against non-standard libraries is ... don't
include non-standard headers and don't link against non-standard
libraries.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.