aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2002-12-30 17:47:15 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-12-30 17:47:15 +0000
commit946d5e4529cd58ac965f4d7aaebeda623ad6258a (patch)
tree4e24b753ceff6cd1570762d803f276aadb9c9ade
parent1c3139456d21ccab63c193d341bb83e21b2077fb (diff)
downloadgcc-946d5e4529cd58ac965f4d7aaebeda623ad6258a.zip
gcc-946d5e4529cd58ac965f4d7aaebeda623ad6258a.tar.gz
gcc-946d5e4529cd58ac965f4d7aaebeda623ad6258a.tar.bz2
decl.c (grokdeclarator): Diagnost "extern thread" and "static thread" correctly.
* decl.c (grokdeclarator): Diagnost "extern thread" and "static thread" correctly. From-SVN: r60637
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9a50d25..b3851d4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-30 Mark Mitchell <mark@codesourcery.com>
+
+ * decl.c (grokdeclarator): Diagnost "extern thread" and "static
+ thread" correctly.
+
2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
* decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index c0f82f7..7b29820 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -10430,13 +10430,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
else if (RIDBIT_SETP (i, specbits))
pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id));
- /* Diagnose "__thread extern". Recall that this list
- is in the reverse order seen in the text. */
- if (i == (int)RID_THREAD)
+ /* Diagnose "__thread extern" or "__thread static". */
+ if (RIDBIT_SETP (RID_THREAD, specbits))
{
- if (RIDBIT_SETP (RID_EXTERN, specbits))
+ if (i == (int)RID_EXTERN)
error ("`__thread' before `extern'");
- if (RIDBIT_SETP (RID_STATIC, specbits))
+ else if (i == (int)RID_STATIC)
error ("`__thread' before `static'");
}