Hi Joseph,

> attribs.c has code to ignore all scoped attributes appertaining to
> types except when they are part of the definition of that type.
>
> I think the premise of that code is incorrect, and its presence is a
> bug; such attributes are clearly valid in both C and C++, which
> explicitly specify that attributes in certain syntactic positions
> appertain to a particular type, only for that use of that type and not
> for other uses of the same type specifiers without that attribute
> specified, and while the standard attributes in C2x aren't relevant in
> such contexts, some gnu:: attributes certainly are.  Where some
> attributes are invalid on some types in such contexts, that's a matter
> for the individual attribute handlers to diagnose (or the front end if
> the requirements on a standard attribute in the standard are more
> strict than those of a handler shared with a GNU attribute).
>
> Thus, this patch removes the bogus code to allow such attributes to be
> used.  Doing so (and adding tests for attributes in such positions)
> shows up that the logic in the C front end for creating the
> c_declarator structures for such attributes put them in the wrong
> place relative to the structures for function and array types, and the
> logic for postfix attributes on a list of declaration specifiers
> failed to handle some cases, so those bugs are also fixed in this
> patch.
>
> Bootstrapped with no regressions for x86_64-pc-linux-gnu.  OK to commit 
> (attribs.c and C++ testsuite changes)?

it seems you missed updating a couple of testcases that are ia32-only:

+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++14  (test for warnings, line 12)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++14  (test for warnings, line 13)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++14  (test for warnings, line 20)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++14  (test for warnings, line 21)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++14 (test for excess errors)

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C:12:50: 
warning: 'stdcall' attribute only applies to function types [-Wattributes]

+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++17  (test for warnings, line 12)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++17  (test for warnings, line 13)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++17  (test for warnings, line 20)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++17  (test for warnings, line 21)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++17 (test for excess errors)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++2a  (test for warnings, line 12)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++2a  (test for warnings, line 13)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++2a  (test for warnings, line 20)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++2a  (test for warnings, line 21)
+FAIL: g++.dg/cpp0x/gen-attrs-36.C  -std=gnu++2a (test for excess errors)
+FAIL: g++.dg/cpp0x/gen-attrs-37.C  -std=gnu++14  (test for warnings, line 13)
+FAIL: g++.dg/cpp0x/gen-attrs-37.C  -std=gnu++17  (test for warnings, line 13)
+FAIL: g++.dg/cpp0x/gen-attrs-37.C  -std=gnu++2a  (test for warnings, line 13)
+FAIL: g++.dg/cpp0x/gen-attrs-8.C  -std=gnu++14  (test for warnings, line 6)
+FAIL: g++.dg/cpp0x/gen-attrs-8.C  -std=gnu++14 (test for excess errors)
+FAIL: g++.dg/cpp0x/gen-attrs-8.C  -std=gnu++17  (test for warnings, line 6)
+FAIL: g++.dg/cpp0x/gen-attrs-8.C  -std=gnu++17 (test for excess errors)
+FAIL: g++.dg/cpp0x/gen-attrs-8.C  -std=gnu++2a  (test for warnings, line 6)
+FAIL: g++.dg/cpp0x/gen-attrs-8.C  -std=gnu++2a (test for excess errors)

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to