OSDN Git Service

2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / cppspec.c
index 6962627..c3adaa1 100644 (file)
@@ -1,11 +1,11 @@
 /* Specific flags and argument handling of the C preprocessor.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2007, 2010 Free Software Foundation, Inc.
 
 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) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -14,9 +14,8 @@ 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, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
@@ -46,6 +45,7 @@ static const char *const known_suffixes[] =
 {
   ".c",  ".C",   ".S",   ".m",
   ".cc", ".cxx", ".cpp", ".cp",  ".c++",
+  ".sx",
   NULL
 };
 
@@ -103,8 +103,8 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
                need_E = 0;
              else if (argv[i][1] == 'S' || argv[i][1] == 'c')
                {
-                 fatal ("\"%s\" is not a valid option to the preprocessor",
-                        argv[i]);
+                 fatal_error ("%qs is not a valid option to the "
+                              "preprocessor", argv[i]);
                  return;
                }
              else if (argv[i][1] == 'x')
@@ -125,7 +125,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
          seen_input++;
          if (seen_input == 3)
            {
-             fatal ("too many input files");
+             fatal_error ("too many input files");
              return;
            }
          else if (seen_input == 2)
@@ -172,7 +172,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
     return;
 
   /* One more slot for a terminating null.  */
-  new_argv = xmalloc ((new_argc + 1) * sizeof(char *));
+  new_argv = XNEWVEC (const char *, new_argc + 1);
 
   new_argv[0] = argv[0];
   j = 1;
@@ -208,9 +208,3 @@ int lang_specific_pre_link (void)
 
 /* Number of extra output files that lang_specific_pre_link may generate.  */
 int lang_specific_extra_outfiles = 0;  /* Not used for cpp.  */
-
-/* Table of language-specific spec functions.  */
-const struct spec_function lang_specific_spec_functions[] =
-{
-  { 0, 0 }
-};