summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-23 14:55:55 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-23 14:55:55 +0000
commit6adc88f8cafa463569e6ee3dacd9b7e0a40051c1 (patch)
tree61e5b420fe39332b5b0cad26106b740dd349a4fa /gcc/doc
parent51ad98633c056041b60df3f980a412b47e20acc3 (diff)
downloadgcc-6adc88f8cafa463569e6ee3dacd9b7e0a40051c1.tar.gz
gcc:
* config.gcc (*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu): Use glibc-c.o in c_target_objs and cxx_target_objs. Use t-glibc in tmake_file. Set target_has_targetcm. (tilegx-*-linux*, tilepro-*-linux*): Append to c_target_objs and cxx_target_objs rather than overriding previous value. * config/glibc-c.c, config/t-glibc: New. * doc/tm.texi.in (TARGET_C_PREINCLUDE): New @hook. * doc/tm.texi: Regenerate. * hooks.c (hook_constcharptr_void_null): New. * hooks.h (hook_constcharptr_void_null): Declare. gcc/c-family: * c-common.h (pch_cpp_save_state): Declare. * c-target.def (c_preinclude): New hook. * c-opts.c (done_preinclude): New. (push_command_line_include): Handle default preincluded header. (cb_file_change): Call pch_cpp_save_state when calling push_command_line_include. * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved) (pch_cpp_save_state): New. (pch_init): Call pch_cpp_save_state conditionally, instead of calling cpp_save_state. gcc/testsuite: * gcc.dg/c99-predef-1.c: New test. * gcc.dg/cpp/cmdlne-dU-1.c, gcc.dg/cpp/cmdlne-dU-2.c, gcc.dg/cpp/cmdlne-dU-3.c, gcc.dg/cpp/cmdlne-dU-4.c, gcc.dg/cpp/cmdlne-dU-5.c, gcc.dg/cpp/cmdlne-dU-6.c, gcc.dg/cpp/cmdlne-dU-7.c, gcc.dg/cpp/cmdlne-dU-8.c, gcc.dg/cpp/cmdlne-dU-9.c, gcc.dg/cpp/cmdlne-dU-10.c, gcc.dg/cpp/cmdlne-dU-11.c, gcc.dg/cpp/cmdlne-dU-12.c, gcc.dg/cpp/cmdlne-dU-13.c, gcc.dg/cpp/cmdlne-dU-14.c, gcc.dg/cpp/cmdlne-dU-15.c, gcc.dg/cpp/cmdlne-dU-16.c, gcc.dg/cpp/cmdlne-dU-17.c, gcc.dg/cpp/cmdlne-dU-18.c, gcc.dg/cpp/cmdlne-dU-19.c, gcc.dg/cpp/cmdlne-dU-20.c, gcc.dg/cpp/cmdlne-dU-21.c, gcc.dg/cpp/cmdlne-dU-22.c, gcc.dg/cpp/mi5.c, gcc.dg/cpp/multiline.c: Add -nostdinc to dg-options. libcpp: * files.c (struct _cpp_file): Add implicit_preinclude. (pch_open_file): Allow a previously opened implicitly included file. (_cpp_find_file): Add implicit_preinclude argument. Free file and do not call open_file_failed if implicit_preinclude. Store implicit_preinclude value. (_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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192715 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/tm.texi6
-rw-r--r--gcc/doc/tm.texi.in2
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index b36c764a3b5..72ea14cd28e 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -10647,6 +10647,12 @@ convention when processing system header files, but when processing user
files @code{__STDC__} will always expand to 1.
@end defmac
+@deftypefn {C Target Hook} {const char *} TARGET_C_PREINCLUDE (void)
+Define this hook to return the name of a header file to be included at the start of all compilations, as if it had been included with @code{#include <@var{file}>}. If this hook returns @code{NULL}, or is not defined, or the header is not found, or if the user specifies @option{-ffreestanding} or @option{-nostdinc}, no header is included.
+
+ This hook can be used together with a header provided by the system C library to implement ISO C requirements for certain macros to be predefined that describe properties of the whole implementation rather than just the compiler.
+@end deftypefn
+
@defmac NO_IMPLICIT_EXTERN_C
Define this macro if the system header files support C++ as well as C@.
This macro inhibits the usual method of using system header files in
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 4858d97e27f..ce31aae4b72 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -10505,6 +10505,8 @@ convention when processing system header files, but when processing user
files @code{__STDC__} will always expand to 1.
@end defmac
+@hook TARGET_C_PREINCLUDE
+
@defmac NO_IMPLICIT_EXTERN_C
Define this macro if the system header files support C++ as well as C@.
This macro inhibits the usual method of using system header files in