OSDN Git Service

* gcc.c (do_spec_1): 'n' for printing notices.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Feb 2001 15:47:30 +0000 (15:47 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Feb 2001 15:47:30 +0000 (15:47 +0000)
* i386.h (CC1_CPU_SPEC): Notice deprecated options as deprecated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39889 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.h
gcc/gcc.c

index ee58bb4..70bd024 100644 (file)
@@ -1,3 +1,8 @@
+Mon Feb 19 16:45:42 CET 2001  Jan Hubicka  <jh@suse.cz>
+
+       * gcc.c (do_spec_1): 'n' for printing notices.
+       * i386.h (CC1_CPU_SPEC): Notice deprecated options as deprecated.
+
 Mon Feb 19 15:51:30 CET 2001  Jan Hubicka  <jh@suse.cz>
 
        * reg-stack.c (next_flags_user): Use current_block->end
index cab8511..b4f7d30 100644 (file)
@@ -405,10 +405,14 @@ extern int ix86_arch;
 #ifndef CC1_CPU_SPEC
 #define CC1_CPU_SPEC "\
 %{!mcpu*: \
-%{m386:-mcpu=i386} \
-%{m486:-mcpu=i486} \
-%{mpentium:-mcpu=pentium} \
-%{mpentiumpro:-mcpu=pentiumpro}}"
+%{m386:-mcpu=i386 \
+%n`-mpentium' is deprecated. Use `-march' or `-mcpu' instead.\n} \
+%{m486:-mcpu=i486 \
+%n`-mpentium' is deprecated. Use `-march' or `-mcpu' instead.\n} \
+%{mpentium:-mcpu=pentium \
+%n`-mpentium' is deprecated. Use `-march' or `-mcpu' instead.\n} \
+%{mpentiumpro:-mcpu=pentiumpro \
+%n`-mpentiumpro' is deprecated. Use `-march' or `-mcpu' instead.\n}}"
 #endif
 \f
 #ifndef CPP_CPU_DEFAULT_SPEC
index f5d6af1..aca77cc 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -360,6 +360,7 @@ or with constant text in a single argument.
        and substitute the full name found.
  %eSTR  Print STR as an error message.  STR is terminated by a newline.
         Use this when inconsistent options are detected.
+ %nSTR  Print STR as an notice.  STR is terminated by a newline.
  %x{OPTION}    Accumulate an option for %X.
  %X    Output the accumulated linker options specified by compilations.
  %Y    Output the accumulated assembler options specified by compilations.
@@ -4196,6 +4197,21 @@ do_spec_1 (spec, inswitch, soft_matched_part)
              return -1;
            }
            break;
+         case 'n':
+           /* %nfoo means report an notice with `foo' on stderr.  */
+           {
+             const char *q = p;
+             char *buf;
+             while (*p != 0 && *p != '\n')
+               p++;
+             buf = (char *) alloca (p - q + 1);
+             strncpy (buf, q, p - q);
+             buf[p - q] = 0;
+             notice ("%s\n", buf);
+             if (*p)
+               p++;
+           }
+           break;
 
          case 'j':
            {