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]

[PATCH] -Wc++0x-compat


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.

Tested i386-apple-darwin8.8.1, no regressions.

Okay for mainline?

	Cheers,
	Doug

Attachment: c++0x-compat-cp.patch
Description: Binary data

Attachment: c++0x-compat-gcc.patch
Description: Binary data

Attachment: c++0x-compat-testsuite.patch
Description: Binary data




2007-01-23 Douglas Gregor <dgregor@osl.iu.edu>


	* lex.c (D_CPP0X): Rename.
	(D_CXX0X): To this.
	(reswords): D_CPP0X -> D_CXX0X.
	(init_reswords): Ditto.
	* parser.c (cp_lexer_get_preprocessor_token): Warn about the use
	of C++0x keywords as identifiers.
	
2007-01-23  Douglas Gregor  <dgregor@osl.iu.edu>

	* c-common.h (RID_FIRST_CXX0X): New.
	(RID_LAST_CXX0X): New.
	* c-opts.c (c_common_handle_option): -Wc++0x-compat is triggered
	by -Wall.
	* c.opt (Wc++0x-compat): New.
	* doc/invoke.texi (-Wc++0x-compat): Document.

2007-01-23 Douglas Gregor <dgregor@osl.iu.edu>

* g++.dg/cpp0x/warn_cxx0x.C: New.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]