This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37519] New: confusing error message about attribute section name type
- From: "nm127 at freemail dot hu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2008 09:17:13 -0000
- Subject: [Bug c/37519] New: confusing error message about attribute section name type
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When compiling the following (bad) code with gcc 4.4.0 20080912 I get an error
message.
int x __attribute__ ((__section__(1)));
int main() {
return 0;
}
The error message is:
test.c:2: error: section attribute not allowed for 'x'
The problem is really that the __section__ should have string parameter and not
a number (1). I expect an error message like this:
test7.c:2: error: section attribute name must be string for 'x'
--
Summary: confusing error message about attribute section name
type
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nm127 at freemail dot hu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37519