OSDN Git Service

* semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Jan 1999 10:42:12 +0000 (10:42 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Jan 1999 10:42:12 +0000 (10:42 +0000)
PR 18132
* decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
that we don't suppress the other copies.
* lex.c (handle_cp_pragma): Likewise.
PR 18627

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24662 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/cp/lex.c
gcc/cp/semantics.c

index 36d3a34..a014516 100644 (file)
@@ -1,3 +1,11 @@
+1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
+
+       * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
+       that we don't suppress the other copies.
+       * lex.c (handle_cp_pragma): Likewise.
+
 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
 
        * decl.c (grokdeclarator): Undo 1998-12-14 change.
index fba0661..0ca5753 100644 (file)
@@ -1,5 +1,5 @@
 /* Process declarations and variables for C compiler.
-   Copyright (C) 1988, 92-97, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1988, 92-98, 1999 Free Software Foundation, Inc.
    Hacked by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GNU CC.
@@ -2482,7 +2482,6 @@ import_export_vtable (decl, type, final)
 
       int found = CLASSTYPE_TEMPLATE_INSTANTIATION (type);
 
-#ifndef MULTIPLE_SYMBOL_SPACES
       if (! found && ! final)
        {
          tree method;
@@ -2496,7 +2495,6 @@ import_export_vtable (decl, type, final)
                break;
              }
        }
-#endif
 
       if (final || ! found)
        {
@@ -2539,7 +2537,6 @@ import_export_class (ctype)
       && ! flag_implicit_templates)
     import_export = -1;
 
-#ifndef MULTIPLE_SYMBOL_SPACES
   /* Base our import/export status on that of the first non-inline,
      non-abstract virtual function, if any.  */
   if (import_export == 0
@@ -2559,6 +2556,10 @@ import_export_class (ctype)
            }
        }
     }
+
+#ifdef MULTIPLE_SYMBOL_SPACES
+  if (import_export == -1)
+    import_export = 0;
 #endif
 
   if (import_export)
index 505fbba..0e61c35 100644 (file)
@@ -1,5 +1,5 @@
 /* Separate lexical analyzer for GNU C++.
-   Copyright (C) 1987, 89, 92-97, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1987, 89, 92-98, 1999 Free Software Foundation, Inc.
    Hacked by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GNU CC.
@@ -4854,7 +4854,6 @@ handle_cp_pragma (pname)
       if (token != END_OF_LINE)
        warning ("garbage after `#pragma interface' ignored");
 
-#ifndef MULTIPLE_SYMBOL_SPACES
       write_virtuals = 3;
 
       if (impl_file_chain == 0)
@@ -4878,10 +4877,14 @@ handle_cp_pragma (pname)
        }
 
       interface_only = interface_strcmp (main_filename);
+#ifdef MULTIPLE_SYMBOL_SPACES
+      if (! interface_only)
+       interface_unknown = 0;
+#else /* MULTIPLE_SYMBOL_SPACES */
       interface_unknown = 0;
+#endif /* MULTIPLE_SYMBOL_SPACES */
       TREE_INT_CST_LOW (fileinfo) = interface_only;
       TREE_INT_CST_HIGH (fileinfo) = interface_unknown;
-#endif /* MULTIPLE_SYMBOL_SPACES */
 
       return 1;
     }
@@ -4908,7 +4911,6 @@ handle_cp_pragma (pname)
       if (token != END_OF_LINE)
        warning ("garbage after `#pragma implementation' ignored");
 
-#ifndef MULTIPLE_SYMBOL_SPACES
       if (write_virtuals == 3)
        {
          struct impl_files *ifiles = impl_file_chain;
@@ -4953,7 +4955,6 @@ handle_cp_pragma (pname)
 #endif
       TREE_INT_CST_LOW (fileinfo) = interface_only;
       TREE_INT_CST_HIGH (fileinfo) = interface_unknown;
-#endif /* MULTIPLE_SYMBOL_SPACES */
 
       return 1;
     }
index 4bd997d..e4d4371 100644 (file)
@@ -747,7 +747,9 @@ finish_asm_stmt (cv_qualifier, string, output_operands,
        }
       else
        {
-         if (cv_qualifier != NULL_TREE)
+         /* Don't warn about redundant specification of 'volatile' here.  */
+         if (cv_qualifier != NULL_TREE
+             && cv_qualifier != ridpointers[(int) RID_VOLATILE])
            cp_warning ("%s qualifier ignored on asm",
                        IDENTIFIER_POINTER (cv_qualifier));
          expand_asm (string);