This is the mail archive of the gcc-cvs@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]

r242743 - in /trunk: gcc/ChangeLog gcc/c-family...


Author: bonzini
Date: Wed Nov 23 10:06:07 2016
New Revision: 242743

URL: https://gcc.gnu.org/viewcvs?rev=242743&root=gcc&view=rev
Log:
gcc:
2016-11-23  Paolo Bonzini  <bonzini@gnu.org>

	* system.h (HAVE_DESIGNATED_INITIALIZERS,
	HAVE_DESIGNATED_UNION_INITIALIZERS): Do not use
	"defined" in macros.
	* doc/cpp.texi (Defined): Mention -Wexpansion-to-defined.
	* doc/cppopts.texi (Invocation): Document -Wexpansion-to-defined.
	* doc/invoke.texi (Warning Options): Document -Wexpansion-to-defined.

gcc/c-family:
2016-11-23  Paolo Bonzini  <bonzini@gnu.org>

	* c.opt (Wexpansion-to-defined): New.

gcc/testsuite:
2016-11-23  Paolo Bonzini  <bonzini@gnu.org>

	* gcc.dg/cpp/defined.c: Mark newly introduced warnings and
	adjust for warning->pedwarn change.
	* gcc.dg/cpp/defined-syshdr.c,
	gcc.dg/cpp/defined-Wexpansion-to-defined.c,
	gcc.dg/cpp/defined-Wextra-Wno-expansion-to-defined.c,
	gcc.dg/cpp/defined-Wextra.c,
	gcc.dg/cpp/defined-Wno-expansion-to-defined.c: New testcases.

libcpp:
2016-11-23  Paolo Bonzini  <bonzini@gnu.org>

	* include/cpplib.h (struct cpp_options): Add new member
	warn_expansion_to_defined.
	(CPP_W_EXPANSION_TO_DEFINED): New enum member.
	* expr.c (parse_defined): Warn for all uses of "defined"
	in macros, and tie warning to CPP_W_EXPANSION_TO_DEFINED.
	Make it a pedwarning instead of a warning.
	* system.h (HAVE_DESIGNATED_INITIALIZERS): Do not use
	"defined" in macros.


Added:
    trunk/gcc/testsuite/gcc.dg/cpp/defined-Wexpansion-to-defined.c
    trunk/gcc/testsuite/gcc.dg/cpp/defined-Wextra-Wno-expansion-to-defined.c
    trunk/gcc/testsuite/gcc.dg/cpp/defined-Wextra.c
    trunk/gcc/testsuite/gcc.dg/cpp/defined-Wno-expansion-to-defined.c
    trunk/gcc/testsuite/gcc.dg/cpp/defined-syshdr.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c.opt
    trunk/gcc/doc/cpp.texi
    trunk/gcc/doc/cppopts.texi
    trunk/gcc/doc/invoke.texi
    trunk/gcc/system.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/cpp/defined.c
    trunk/libcpp/ChangeLog
    trunk/libcpp/expr.c
    trunk/libcpp/include/cpplib.h
    trunk/libcpp/system.h


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