[Bug c/58288] New: Incorrect error message on malformed section attribute syntax.
suckfish at ihug dot co.nz
gcc-bugzilla@gcc.gnu.org
Sat Aug 31 23:22:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58288
Bug ID: 58288
Summary: Incorrect error message on malformed section attribute
syntax.
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: suckfish at ihug dot co.nz
If a section attribute is malformed, then the gcc error message incorrectly
claims that the "section attribute [is] not allowed".
For the example below, a section attribute is allowed, the actual cause of the
error is that the section name is not specified.
$ cat temp.c
int a __attribute__((section(x)));
$ gcc -m32 -c temp.c
temp.c:1:5: error: section attribute not allowed for ‘a’
int a __attribute__((section(x)));
^
Happens both with gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) and with current
gcc trunk (rev 202134).
More information about the Gcc-bugs
mailing list