OSDN Git Service

* config/host-hpux.c: Change copyright header to refer to version 3 of the GNU
[pf3gnuchains/gcc-fork.git] / gcc / config / v850 / v850-c.c
index 82c71de..dc0082c 100644 (file)
@@ -1,12 +1,12 @@
 /* v850 specific, C compiler specific functions.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2007 Free Software Foundation, Inc.
    Contributed by Jeff Law (law@cygnus.com).
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -15,9 +15,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
@@ -64,9 +63,11 @@ static int
 pop_data_area (v850_data_area data_area)
 {
   if (data_area_stack == NULL)
-    warning ("#pragma GHS endXXXX found without previous startXXX");
+    warning (OPT_Wpragmas, "#pragma GHS endXXXX found without "
+            "previous startXXX");
   else if (data_area != data_area_stack->data_area)
-    warning ("#pragma GHS endXXX does not match previous startXXX");
+    warning (OPT_Wpragmas, "#pragma GHS endXXX does not match "
+            "previous startXXX");
   else
     {
       data_area_stack_element * elem;
@@ -91,7 +92,7 @@ mark_current_function_as_interrupt (void)
   
   if (current_function_decl ==  NULL_TREE)
     {
-      warning ("cannot set interrupt attribute: no current function");
+      warning (0, "cannot set interrupt attribute: no current function");
       return;
     }
 
@@ -99,7 +100,7 @@ mark_current_function_as_interrupt (void)
 
   if (name == NULL_TREE || TREE_CODE (name) != IDENTIFIER_NODE)
     {
-      warning ("cannot set interrupt attribute: no such identifier");
+      warning (0, "cannot set interrupt attribute: no such identifier");
       return;
     }
   
@@ -123,7 +124,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
       const char *sect, *alias;
       enum GHS_section_kind kind;
       
-      type = c_lex (&x);
+      type = pragma_lex (&x);
       
       if (type == CPP_EOF && !repeat)
        goto reset;
@@ -133,18 +134,18 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
        goto bad;
       repeat = 0;
       
-      if (c_lex (&x) != CPP_EQ)
+      if (pragma_lex (&x) != CPP_EQ)
        goto bad;
-      if (c_lex (&x) != CPP_NAME)
+      if (pragma_lex (&x) != CPP_NAME)
        goto bad;
       
       alias = IDENTIFIER_POINTER (x);
       
-      type = c_lex (&x);
+      type = pragma_lex (&x);
       if (type == CPP_COMMA)
        repeat = 1;
       else if (type != CPP_EOF)
-       warning ("junk at end of #pragma ghs section");
+       warning (OPT_Wpragmas, "junk at end of #pragma ghs section");
       
       if      (streq (sect, "data"))    kind = GHS_SECTION_KIND_DATA;
       else if (streq (sect, "text"))    kind = GHS_SECTION_KIND_TEXT;
@@ -161,7 +162,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
       else if (streq (sect, "zbss"))    kind = GHS_SECTION_KIND_ZDATA;
       else
        {
-         warning ("unrecognized section name \"%s\"", sect);
+         warning (0, "unrecognized section name \"%s\"", sect);
          return;
        }
       
@@ -176,7 +177,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
   return;
 
  bad:
-  warning ("malformed #pragma ghs section");
+  warning (OPT_Wpragmas, "malformed #pragma ghs section");
   return;
 
  reset:
@@ -194,8 +195,8 @@ ghs_pragma_interrupt (cpp_reader * pfile ATTRIBUTE_UNUSED)
 {
   tree x;
   
-  if (c_lex (&x) != CPP_EOF)
-    warning ("junk at end of #pragma ghs interrupt");
+  if (pragma_lex (&x) != CPP_EOF)
+    warning (OPT_Wpragmas, "junk at end of #pragma ghs interrupt");
   
   mark_current_function_as_interrupt ();
 }
@@ -205,8 +206,8 @@ ghs_pragma_starttda (cpp_reader * pfile ATTRIBUTE_UNUSED)
 {
   tree x;
   
-  if (c_lex (&x) != CPP_EOF)
-    warning ("junk at end of #pragma ghs starttda");
+  if (pragma_lex (&x) != CPP_EOF)
+    warning (OPT_Wpragmas, "junk at end of #pragma ghs starttda");
   
   push_data_area (DATA_AREA_TDA);
 }
@@ -216,8 +217,8 @@ ghs_pragma_startsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
 {
   tree x;
   
-  if (c_lex (&x) != CPP_EOF)
-    warning ("junk at end of #pragma ghs startsda");
+  if (pragma_lex (&x) != CPP_EOF)
+    warning (OPT_Wpragmas, "junk at end of #pragma ghs startsda");
   
   push_data_area (DATA_AREA_SDA);
 }
@@ -227,8 +228,8 @@ ghs_pragma_startzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
 {
   tree x;
   
-  if (c_lex (&x) != CPP_EOF)
-    warning ("junk at end of #pragma ghs startzda");
+  if (pragma_lex (&x) != CPP_EOF)
+    warning (OPT_Wpragmas, "junk at end of #pragma ghs startzda");
   
   push_data_area (DATA_AREA_ZDA);
 }
@@ -238,8 +239,8 @@ ghs_pragma_endtda (cpp_reader * pfile ATTRIBUTE_UNUSED)
 {
   tree x;
   
-  if (c_lex (&x) != CPP_EOF)
-    warning ("junk at end of #pragma ghs endtda");
+  if (pragma_lex (&x) != CPP_EOF)
+    warning (OPT_Wpragmas, "junk at end of #pragma ghs endtda");
   
   pop_data_area (DATA_AREA_TDA);
 }
@@ -249,8 +250,8 @@ ghs_pragma_endsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
 {
   tree x;
   
-  if (c_lex (&x) != CPP_EOF)
-    warning ("junk at end of #pragma ghs endsda");
+  if (pragma_lex (&x) != CPP_EOF)
+    warning (OPT_Wpragmas, "junk at end of #pragma ghs endsda");
   
   pop_data_area (DATA_AREA_SDA);
 }
@@ -260,8 +261,8 @@ ghs_pragma_endzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
 {
   tree x;
   
-  if (c_lex (&x) != CPP_EOF)
-    warning ("junk at end of #pragma ghs endzda");
+  if (pragma_lex (&x) != CPP_EOF)
+    warning (OPT_Wpragmas, "junk at end of #pragma ghs endzda");
   
   pop_data_area (DATA_AREA_ZDA);
 }