summaryrefslogtreecommitdiff
path: root/libcpp/macro.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-23 21:50:15 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-23 21:50:15 +0000
commit31614f7c20bd8844ce91e4eeb7da389c78f5299f (patch)
tree426b4cdfa24c0b381ad5f2bef8e8807afd097204 /libcpp/macro.c
parentd134bccc6c6b6af4c72a6952bce16e26747cb650 (diff)
downloadgcc-31614f7c20bd8844ce91e4eeb7da389c78f5299f.tar.gz
PR preprocessor/25717
* init.c (cpp_init_builtins): If __STDC__ will not change value between system headers and other sources, define it as a normal macro rather than a builtin. * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check cpp_in_system_header condition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110144 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/macro.c')
-rw-r--r--libcpp/macro.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/libcpp/macro.c b/libcpp/macro.c
index 2f1a97497a1..3204e553b02 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -169,16 +169,12 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
However, if (a) we are in a system header, (b) the option
stdc_0_in_system_headers is true (set by target config), and
(c) we are not in strictly conforming mode, then it has the
- value 0. */
+ value 0. (b) and (c) are already checked in cpp_init_builtins. */
case BT_STDC:
- {
- if (cpp_in_system_header (pfile)
- && CPP_OPTION (pfile, stdc_0_in_system_headers)
- && !CPP_OPTION (pfile,std))
- number = 0;
- else
- number = 1;
- }
+ if (cpp_in_system_header (pfile))
+ number = 0;
+ else
+ number = 1;
break;
case BT_DATE: