This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Wednesday, 24. January 2007 04:45, Douglas Gregor wrote: > The attached patch (in 3 parts) adds a new flag, -Wc++0x-compat, that > we will use to warn about C++ constructs that will change in C++0x. > This patch adds the option, enables it as part of -Wall, and warns > about C++ identifiers that will become keywords. Right now, that's > only `static_assert', but as keywords get added into C++0x we'll > complain about those, too. >+ warning (0, "identifier %<%s%> will become a keyword in >C++0x", >+ IDENTIFIER_POINTER (token->u.value)); >+ Could you please add OPT_cxx0x-compat to the warning statement so that -Werror=c++0x-compat works? BTW, given that this is a very complicated name for a warning option, and given that there is a generic bugreport that says that gcc should not immediately introduce new errors but first for one major release warn about them becoming an error, how about adding a generic name that could be re-used for other issues that should become an error but would break existing code (sort of reverse of -fpermissive) ? I would suggest -Wstd-compat (name open for better suggestions). This warning would be an example of it, but even if we come up with other things that should be an error (or should become an error with the next standard) we could add them to this warning (which is enabled by -Wall). The user can then decide if he is not interested (-Wno-std-compat) or really interested (-Werror=std-compat). Comments? Dirk
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |