aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 82b3056b704..d8e622bca4e 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -1052,6 +1052,8 @@ cpp_finish_options (pfile)
{
struct pending_option *p;
+ /* Prevent -Wunused-macros with command-line redefinitions. */
+ pfile->first_unused_line = (unsigned int) -1;
_cpp_do_file_change (pfile, LC_RENAME, _("<built-in>"), 1, 0);
init_builtins (pfile);
_cpp_do_file_change (pfile, LC_RENAME, _("<command line>"), 1, 0);
@@ -1322,24 +1324,7 @@ cpp_handle_option (pfile, argc, argv)
case OPT_A:
if (arg[0] == '-')
- {
- /* -A with an argument beginning with '-' acts as
- #unassert on whatever immediately follows the '-'.
- If "-" is the whole argument, we eliminate all
- predefined macros and assertions, including those
- that were specified earlier on the command line.
- That way we can get rid of any that were passed
- automatically in from GCC. */
-
- if (arg[1] == '\0')
- {
- free_chain (pend->directive_head);
- pend->directive_head = NULL;
- pend->directive_tail = NULL;
- }
- else
- new_pending_directive (pend, arg + 1, cpp_unassert);
- }
+ new_pending_directive (pend, arg + 1, cpp_unassert);
else
new_pending_directive (pend, arg, cpp_assert);
break;