if (flag_undef)
return;
+ /* Make sure all of the builtins about to be declared have
+ BUILTINS_LOCATION has their location_t. */
+ cpp_force_token_locations (parse_in, BUILTINS_LOCATION);
+
/* Other target-independent built-ins determined by command-line
options. */
if (!prev->x_optimize_size && cur->x_optimize_size)
cpp_define_unused (pfile, "__ROUNDING_MATH__");
else if (prev->x_flag_rounding_math && !cur->x_flag_rounding_math)
cpp_undef (pfile, "__ROUNDING_MATH__");
+
+ cpp_stop_forcing_token_locations (parse_in);
}
unsigned char saved_warn_unused_macros = cpp_opts->warn_unused_macros;
cpp_opts->warn_unused_macros = 0;
+ cpp_force_token_locations (parse_in, BUILTINS_LOCATION);
aarch64_update_cpp_builtins (parse_in);
+ cpp_stop_forcing_token_locations (parse_in);
cpp_opts->warn_unused_macros = saved_warn_unused_macros;
acond_macro = get_identifier ("__ARM_FEATURE_LDREX");
C_CPP_HASHNODE (acond_macro)->flags |= NODE_CONDITIONAL;
+ cpp_force_token_locations (parse_in, BUILTINS_LOCATION);
arm_cpu_builtins (parse_in);
+ cpp_stop_forcing_token_locations (parse_in);
cpp_opts->warn_unused_macros = saved_warn_unused_macros;
cur_tune = prev_tune = PROCESSOR_max;
/* Undef all of the macros for that are no longer current. */
+ cpp_force_token_locations (parse_in, BUILTINS_LOCATION);
ix86_target_macros_internal (prev_isa & diff_isa,
prev_isa2 & diff_isa2,
prev_arch,
prev_tune,
(enum fpmath_unit) prev_opt->x_ix86_fpmath,
cpp_undef);
+ cpp_stop_forcing_token_locations (parse_in);
/* For the definitions, ensure all newly defined macros are considered
as used for -Wunused-macros. There is no point warning about the
cpp_opts->warn_unused_macros = 0;
/* Define all of the macros for new options that were just turned on. */
+ cpp_force_token_locations (parse_in, BUILTINS_LOCATION);
ix86_target_macros_internal (cur_isa & diff_isa,
cur_isa2 & diff_isa2,
cur_arch,
cur_tune,
(enum fpmath_unit) cur_opt->x_ix86_fpmath,
cpp_define);
+ cpp_stop_forcing_token_locations (parse_in);
cpp_opts->warn_unused_macros = saved_warn_unused_macros;
cpp_opts->warn_unused_macros = 0;
/* Define all of the macros for new options that were just turned on. */
+ cpp_force_token_locations (parse_in, BUILTINS_LOCATION);
s390_cpu_cpp_builtins_internal (parse_in, cur_opt, prev_opt);
+ cpp_stop_forcing_token_locations (parse_in);
cpp_opts->warn_unused_macros = saved_warn_unused_macros;
}
--- /dev/null
+// PR c++/103012
+// { dg-do compile }
+
+int a = 1;
+#pragma GCC optimize "Og"
+#define A(a) a +
+#define B(a) A(a)A(a)
+#define C(a) B(a)B(a)
+#define D(a) C(a)C(a)
+#define E(a) D(a)D(a)
+#define F(a) E(a)E(a)
+#define G(a) F(a)F(a)
+#define H(a) G(a)G(a)
+#define I(a) H(a)H(a)
+#define J(a) I(a)I(a)
+#define K(a) J(a)J(a)
+#define L(a) K(a)K(a)
+int b = L(a) 1;
--- /dev/null
+// PR c++/103012
+// { dg-do compile }
+// { dg-options "-mno-avx2" }
+
+int a = 1;
+#pragma GCC target "avx2"
+#define A(a) a +
+#define B(a) A(a)A(a)
+#define C(a) B(a)B(a)
+#define D(a) C(a)C(a)
+#define E(a) D(a)D(a)
+#define F(a) E(a)E(a)
+#define G(a) F(a)F(a)
+#define H(a) G(a)G(a)
+#define I(a) H(a)H(a)
+#define J(a) I(a)I(a)
+#define K(a) J(a)J(a)
+#define L(a) K(a)K(a)
+int b = L(a) 1;