aboutsummaryrefslogtreecommitdiff
path: root/gcc/tradcpp.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-08-29 18:37:37 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-08-29 18:37:37 +0000
commit2c8f0515bbed378f1e87e1b52e2913d058cbed16 (patch)
tree7f03453e92f612da7c6531488d3878a73dbda657 /gcc/tradcpp.c
parent5c5d1cd68a748299a244a6b9fd7c3fce2f09d582 (diff)
downloadgcc-2c8f0515bbed378f1e87e1b52e2913d058cbed16.zip
gcc-2c8f0515bbed378f1e87e1b52e2913d058cbed16.tar.gz
gcc-2c8f0515bbed378f1e87e1b52e2913d058cbed16.tar.bz2
cpperror.c (print_file_and_line): If line is (unsigned int)-1, print just the filename.
* cpperror.c (print_file_and_line): If line is (unsigned int)-1, print just the filename. * cpplex.c (_cpp_run_directive): Add additional argument, the name to give the synthetic buffer. This defaults to translated "<command line>". * cpplib.c (cpp_define, cpp_undef, cpp_assert, cpp_unassert): Adjust to match. (_cpp_define_builtin): New function. * cppinit.c (initialize_builtins): Use _cpp_define_builtin. * cpphash.h: Update prototypes. * tradcpp.c (main): Process -D and -U simultaneously, in the order they appeared on the command line. From-SVN: r36043
Diffstat (limited to 'gcc/tradcpp.c')
-rw-r--r--gcc/tradcpp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/tradcpp.c b/gcc/tradcpp.c
index 5e88c02..125e2cb 100644
--- a/gcc/tradcpp.c
+++ b/gcc/tradcpp.c
@@ -711,14 +711,11 @@ main (argc, argv)
and option processing. */
initialize_builtins ();
- /* Do defines specified with -D. */
+ /* Do defines specified with -D and undefines specified with -U. */
for (i = 1; i < argc; i++)
if (pend_defs[i])
make_definition ((U_CHAR *)pend_defs[i]);
-
- /* Do undefines specified with -U. */
- for (i = 1; i < argc; i++)
- if (pend_undefs[i])
+ else if (pend_undefs[i])
make_undef ((U_CHAR *)pend_undefs[i]);
/* Unless -fnostdinc,