-2006-02-05 Paolo Bonzini <bonzini@gnu.org>
+2006-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ 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.
+
+2006-01-05 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in: Use -MMD instead of -MD.
if (CPP_OPTION (pfile, traditional))
n -= 2;
+ else if (! CPP_OPTION (pfile, stdc_0_in_system_headers)
+ || CPP_OPTION (pfile, std))
+ {
+ n--;
+ _cpp_define_builtin (pfile, "__STDC__ 1");
+ }
- for(b = builtin_array; b < builtin_array + n; b++)
+ for (b = builtin_array; b < builtin_array + n; b++)
{
cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len);
hp->type = NT_MACRO;
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: