summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-19 15:47:30 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-19 15:47:30 +0000
commit90286764244e76c15f1d3a85fb3c1fc6de3db7ec (patch)
tree8b2d6bff6a3800ced3dae642e86a4f96770c8552 /gcc/gcc.c
parentc3291f41d23b084b48845bce15abac80d301bfa5 (diff)
downloadgcc-90286764244e76c15f1d3a85fb3c1fc6de3db7ec.tar.gz
* gcc.c (do_spec_1): 'n' for printing notices.
* 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
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index f5d6af1c889..aca77cc9db8 100644
--- 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':
{