Summary: | Confusing error message order 'error: ‘functionname’ declared as an ‘inline’ variable' | ||
---|---|---|---|
Product: | gcc | Reporter: | Carlo Wood <carlo> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | dan, donmgeso, gcc-bugs |
Priority: | P3 | Keywords: | diagnostic |
Version: | 4.2.4 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | 4.4.0 | Last reconfirmed: | 2008-06-28 21:25:32 |
Description
Carlo Wood
2008-06-28 14:20:15 UTC
Confirmed. Still present in 4.5.1, real world example from building xulrunner 2.0 on Fedora/s390x jsval.h:524:22: error: 'JSVAL_IS_DOUBLE_IMPL' declared as an 'inline' variable jsval.h:524:22: warning: 'always_inline' attribute ignored jsval.h:524:22: error: 'jsval_layout' was not declared in this scope jsval.h:525:1: error: expected ',' or ';' before '{' token jsval.h:529:25: error: 'jsval_layout' does not name a type Found this bug while trying to compile Spidermonkey 1.85 with gcc 4.6 (g++). nanojit.h:183:26: error: 'isS32' declared as an 'inline' variable. The code is: static inline bool isS32(intptr_t i) { return int32_t(i) == i; } Is there a fix for this or is this version flawed? Can we be certain this bug will be fixed by the next release? Found this bug while trying to compile Spidermonkey 1.85 with gcc 4.6 (g++). nanojit.h:183:26: error: 'isS32' declared as an 'inline' variable. The code is: static inline bool isS32(intptr_t i) { return int32_t(i) == i; } Is there a fix for this or is this version flawed? Can we be certain this bug will be fixed by the next release? This is a basic declaration and should work. (In reply to comment #4) > Is there a fix for this or is this version flawed? Can we be certain this bug > will be fixed by the next release? This is a basic declaration and should > work. Read the bugzilla report. It's not a bug, it's an enhancement request for a better error message. The compiler is correct to reject your code, but it could print a more helpful message. Your problem appears to be caused by failing to #include <stdint.h>, not a compiler bug. Yeah.., soon realized that after looking into it. Thanks. |