]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/c-family/c-pch.c
Wrap option names in gcc internal messages with %< and %>.
[thirdparty/gcc.git] / gcc / c-family / c-pch.c
index 4db9c24be49c4ce1917bae7bd62f89880df54ae5..316fb84f429a2c3f19710db8d4a850f80e14fd2f 100644 (file)
@@ -1,5 +1,5 @@
 /* Precompiled header implementation for the C languages.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2019 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -20,22 +20,14 @@ along with GCC; see the file COPYING3.  If not see
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "version.h"
-#include "cpplib.h"
-#include "options.h"
-#include "input.h"
-#include "alias.h"
-#include "symtab.h"
-#include "tree.h"
-#include "flags.h"
+#include "target.h"
 #include "c-common.h"
+#include "timevar.h"
+#include "flags.h"
 #include "debug.h"
 #include "c-pragma.h"
 #include "langhooks.h"
 #include "hosthooks.h"
-#include "target.h"
-#include "opts.h"
-#include "timevar.h"
 
 /* This is a list of flag variables that must match exactly, and their
    names for the error message.  The possible values for *flag_var must
@@ -53,10 +45,6 @@ enum {
   MATCH_SIZE = ARRAY_SIZE (pch_matching)
 };
 
-/* The value of the checksum in the dummy compiler that is actually
-   checksummed.  That compiler should never be run.  */
-static const char no_checksum[16] = { 0 };
-
 /* Information about flags and suchlike that affect PCH validity.
 
    Before this structure is read, both an initial 8-character identification
@@ -119,8 +107,6 @@ pch_init (void)
                 pch_file);
   pch_outfile = f;
 
-  gcc_assert (memcmp (executable_checksum, no_checksum, 16) != 0);
-
   memset (&v, '\0', sizeof (v));
   v.debug_info_type = write_symbols;
   {
@@ -220,8 +206,6 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
   /* Perform a quick test of whether this is a valid
      precompiled header for the current language.  */
 
-  gcc_assert (memcmp (executable_checksum, no_checksum, 16) != 0);
-
   sizeread = read (fd, ident, IDENT_LENGTH + 16);
   if (sizeread == -1)
     fatal_error (input_location, "can%'t read %s: %m", name);
@@ -422,7 +406,8 @@ c_common_pch_pragma (cpp_reader *pfile, const char *name)
 
   if (!cpp_get_options (pfile)->preprocessed)
     {
-      error ("pch_preprocess pragma should only be used with -fpreprocessed");
+      error ("pch_preprocess pragma should only be used "
+            "with %<-fpreprocessed%>");
       inform (input_location, "use #include instead");
       return;
     }
@@ -434,7 +419,7 @@ c_common_pch_pragma (cpp_reader *pfile, const char *name)
   if (c_common_valid_pch (pfile, name, fd) != 1)
     {
       if (!cpp_get_options (pfile)->warn_invalid_pch)
-       inform (input_location, "use -Winvalid-pch for more information");
+       inform (input_location, "use %<-Winvalid-pch%> for more information");
       fatal_error (input_location, "%s: PCH file was invalid", name);
     }