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]

Re: Move #undef DEF_BUILTIN* to builtins.def


On 11/06/2015 08:35 AM, Richard Sandiford wrote:
I was confused at first why tree-core.h was undefining DEF_BUILTIN_CHKP
before defining it, then undefining it again after including builtins.def.
This is because builtins.def provides a default definition of
DEF_BUILTIN_CHKP, but leaves it up to the caller to undefine it where
necessary.  Similarly to the previous internal-fn.def patch, it seems
more obvious for builtins.def to #undef things unconditionally.

One argument might have been that keeping preprocessor stuff
out of the .def files makes it easier for non-cpp parsers.  In practice
though we already have #ifs and multiline #defines, so single-line #undefs
should be easy in comparison.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
OK to install?

Thanks,
Richard


gcc/ada/
	* gcc-interface/utils.c: Don't undef DEF_BUILTIN.

gcc/c-family/
	* c-common.c: Don't undef DEF_BUILTIN.

gcc/jit/
	* jit-builtins.c: Don't undef DEF_BUILTIN.

gcc/lto/
	* lto-lang.c: Don't undef DEF_BUILTIN.

gcc/
	* builtins.def: #undef DEF_BUILTIN and DEF_BUILTIN_CHKP
	* builtins.c, genmatch.c, tree-core.h: Don't undef them here.
OK.
jeff


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