aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1999-01-14 10:42:12 +0000
committerJason Merrill <jason@gcc.gnu.org>1999-01-14 05:42:12 -0500
commitad236eab582b829e02bcdb05b90a5a9ed289df92 (patch)
tree98a5d82091537eb50bfd6273da30757aa8897552
parent9ef064430c72f88aec17b95501c9e1ce63070ccc (diff)
downloadgcc-ad236eab582b829e02bcdb05b90a5a9ed289df92.zip
gcc-ad236eab582b829e02bcdb05b90a5a9ed289df92.tar.gz
gcc-ad236eab582b829e02bcdb05b90a5a9ed289df92.tar.bz2
re PR other/18132 (Problem compiling gcc 3.4.2)
* semantics.c (finish_asm_stmt): Don't warn about redundant volatile. 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 From-SVN: r24662
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/decl2.c9
-rw-r--r--gcc/cp/lex.c11
-rw-r--r--gcc/cp/semantics.c4
4 files changed, 22 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 36d3a34..a014516 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index fba0661..0ca5753 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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)
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 505fbba..0e61c35 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -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;
}
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 4bd997d..e4d4371 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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);