]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/gengtype-parse.c
PR fortran/95090 - ICE: identifier overflow
[thirdparty/gcc.git] / gcc / gengtype-parse.c
index f99b853cd663bdbcf9d61af51e340c98c4ca41fc..920e451cf3d6db15a88ea55a6adb7d4ca1347618 100644 (file)
@@ -1,5 +1,5 @@
 /* Process source files and output type information.
-   Copyright (C) 2006-2014 Free Software Foundation, Inc.
+   Copyright (C) 2006-2020 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -274,17 +274,13 @@ require_template_declaration (const char *tmpl_name)
          str = concat (str, "enum ", (char *) 0);
          continue;
        }
-      if (token () == NUM)
+      if (token () == NUM
+         || token () == ':'
+         || token () == '+')
        {
          str = concat (str, advance (), (char *) 0);
          continue;
        }
-      if (token () == ':')
-       {
-         advance ();
-         str = concat (str, ":", (char *) 0);
-         continue;
-       }
       if (token () == '<')
        {
          advance ();
@@ -952,9 +948,9 @@ type (options_p *optsp, bool nested)
                advance ();
                const char *basename = require (ID);
                /* This may be either an access specifier, or the base name.  */
-               if (0 == strcmp (basename, "public")
-                   || 0 == strcmp (basename, "protected")
-                   || 0 == strcmp (basename, "private"))
+               if (strcmp (basename, "public") == 0
+                   || strcmp (basename, "protected") == 0
+                   || strcmp (basename, "private") == 0)
                  basename = require (ID);
                base_class = find_structure (basename, TYPE_STRUCT);
                if (!base_class)