OSDN Git Service

PR ada/23995
[pf3gnuchains/gcc-fork.git] / gcc / c-lex.c
index 990d2be..1c832c5 100644 (file)
@@ -17,8 +17,8 @@ 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.  */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA.  */
 
 #include "config.h"
 #include "system.h"
@@ -299,7 +299,8 @@ cb_def_pragma (cpp_reader *pfile, source_location loc)
            name = cpp_token_as_text (pfile, s);
        }
 
-      warning (0, "%Hignoring #pragma %s %s", &fe_loc, space, name);
+      warning (OPT_Wunknown_pragmas, "%Hignoring #pragma %s %s",
+              &fe_loc, space, name);
     }
 }
 
@@ -599,8 +600,9 @@ interpret_integer (const cpp_token *token, unsigned int flags)
                  itk = itk_u;
                  warning (0, "this decimal constant is unsigned only in ISO C90");
                }
-             else if (warn_traditional)
-               warning (0, "this decimal constant would be unsigned in ISO C90");
+             else
+               warning (OPT_Wtraditional,
+                        "this decimal constant would be unsigned in ISO C90");
            }
        }
     }
@@ -761,10 +763,11 @@ lex_string (const cpp_token *tok, tree *valp, bool objc_string)
   /* We have read one more token than we want.  */
   _cpp_backup_tokens (parse_in, 1);
   if (concats)
-    strs = (cpp_string *) obstack_finish (&str_ob);
+    strs = XOBFINISH (&str_ob, cpp_string *);
 
-  if (concats && !objc_string && warn_traditional && !in_system_header)
-    warning (0, "traditional C rejects string constant concatenation");
+  if (concats && !objc_string && !in_system_header)
+    warning (OPT_Wtraditional,
+            "traditional C rejects string constant concatenation");
 
   if ((c_lex_string_translate
        ? cpp_interpret_string : cpp_interpret_string_notranslate)