Commit 03c3034e by Kaveh R. Ghazi Committed by Kaveh Ghazi

c-common.c (c_common_reswords): Also warn about keyword "bool".

	* c-common.c (c_common_reswords): Also warn about keyword "bool".
	
testsuite:
	* gcc.dg/Wcxx-compat-2.c: Check for bool/_Bool.

From-SVN: r138859
parent 948b3e67
2008-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-common.c (c_common_reswords): Also warn about keyword "bool".
2008-08-07 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Copy incoming value
......
......@@ -665,7 +665,7 @@ const struct c_common_resword c_common_reswords[] =
{ "__volatile__", RID_VOLATILE, 0 },
{ "asm", RID_ASM, D_ASM },
{ "auto", RID_AUTO, 0 },
{ "bool", RID_BOOL, D_CXXONLY },
{ "bool", RID_BOOL, D_CXXONLY | D_CXXWARN },
{ "break", RID_BREAK, 0 },
{ "case", RID_CASE, 0 },
{ "catch", RID_CATCH, D_CXX_OBJC | D_CXXWARN },
......
2008-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/Wcxx-compat-2.c: Check for bool/_Bool.
2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
* g++.dg/cpp0x/decltype12.C: New.
......
/* { dg-options "-Wc++-compat" } */
int bool;
_Bool foo; /* This is okay. */
int bool; /* { dg-warning "keyword" } */
int catch; /* { dg-warning "keyword" } */
int char16_t; /* { dg-warning "keyword" } */
int char32_t; /* { dg-warning "keyword" } */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment