mips.c (mips_parse_cpu): Warn if the CPU name is given in upper case.
authorDJ Delorie <dj@redhat.com>
Mon, 29 Apr 2002 19:57:21 +0000 (15:57 -0400)
committerDJ Delorie <dj@gcc.gnu.org>
Mon, 29 Apr 2002 19:57:21 +0000 (15:57 -0400)
* config/mips/mips.c (mips_parse_cpu): Warn if the CPU name is
given in upper case.

From-SVN: r52907

gcc/ChangeLog
gcc/config/mips/mips.c

index fbfdb69ce22c1b93b9db1109c5a6f372fa639122..d46e98ead811cc556f87cb8d081b5895a2a0dd71 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-29  DJ Delorie  <dj@redhat.com>
+
+       * config/mips/mips.c (mips_parse_cpu): Warn if the CPU name is
+       given in upper case.
+
 2002-04-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * fixinc/inclhack.def (solaris_widec): Include <wchar.h> in
index 401cbbd4d6d79b10832b4de046ab6c4c0b6d61d3..534b1f6a1fabf43bb932b90c660abeb414f7a78e 100644 (file)
@@ -10122,14 +10122,26 @@ mips_parse_cpu (cpu_string)
   const char *p = cpu_string;
   int seen_v = 0;
   enum processor_type cpu;
+  int warn_upper_case = 0;
 
   /* We need to cope with the various "vr" prefixes for the NEC 4300
      and 4100 processors.  */
   if (*p == 'v' || *p == 'V')
-    seen_v = 1, p++;
+    {
+      if (*p == 'V')
+       warn_upper_case = 1;
+      seen_v = 1, p++;
+    }
 
   if (*p == 'r' || *p == 'R')
-    p++;
+    {
+      if (*p == 'R')
+       warn_upper_case = 1;
+      p++;
+    }
+
+  if (warn_upper_case)
+    warning ("the cpu name must be lower case");
 
   /* Since there is no difference between a R2000 and R3000 in
      terms of the scheduler, we collapse them into just an R3000.  */