This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Defining C99 predefined macros for whole translation unit
- From: Ian Lance Taylor <iant at google dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libc-alpha at sourceware dot org
- Date: Fri, 24 Apr 2009 15:51:56 -0700
- Subject: Re: Defining C99 predefined macros for whole translation unit
- References: <Pine.LNX.4.64.0904181628470.11016@digraph.polyomino.org.uk>
"Joseph S. Myers" <joseph@codesourcery.com> writes:
> gcc:
> 2009-04-18 Joseph Myers <joseph@codesourcery.com>
> * target.h (struct gcc_target): Add c.preinclude.
> * target-def.h (TARGET_C_PREINCLUDE): Define.
> (TARGET_C): Update.
> * doc/tm.texi (TARGET_C_PREINCLUDE): Document.
> * hooks.c (hook_constcharptr_void_null): New.
> * hooks.h (hook_constcharptr_void_null): Declare.
> * targhooks.c (glibc_c_preinclude): New.
> * targhooks.h (glibc_c_preinclude): Declare.
> * c-opts.c (done_preinclude): New.
> (push_command_line_include): Handle default preincluded header.
> * config/linux.h (TARGET_C_PREINCLUDE): Define.
> * config/alpha/linux.h (TARGET_C_PREINCLUDE): Define.
> * config/rs6000/linux.h (TARGET_C_PREINCLUDE): Define.
> * config/rs6000/linux64.h (TARGET_C_PREINCLUDE): Define.
> gcc/testsuite:
> 2009-04-18 Joseph Myers <joseph@codesourcery.com>
> * gcc.dg/c99-predef-1.c: New test.
> libcpp:
> 2009-04-18 Joseph Myers <joseph@codesourcery.com>
> * files.c (_cpp_find_file): Add missing_ok argument. Do not call
> open_file_failed if missing_ok.
> (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date):
> Update calls to _cpp_find_file.
> (_cpp_stack_include): Handle IT_DEFAULT.
> (cpp_push_default_include): New.
> * include/cpplib.h (cpp_push_default_include): Declare.
> * init.c (cpp_read_main_file): Update call to _cpp_find_file.
> * internal.h (enum include_type): Add IT_DEFAULT.
> (_cpp_find_file): Update prototype.
This patch to gcc is OK if the patch to glibc is OK.
> -enum include_type {IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE};
> +enum include_type {IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE, IT_DEFAULT};
Line looks too long--maybe break it?
Thanks.
Ian