public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44056] New: plugin compile error: rtl.def uses "const" keyword because of "CONST" defined to "const" in include/ansidecl.h
@ 2010-05-10 11:01 crquan at gmail dot com
2010-05-10 12:52 ` [Bug c/44056] " steven at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: crquan at gmail dot com @ 2010-05-10 11:01 UTC (permalink / raw)
To: gcc-bugs
Tried native compile gcc-4.50 on both x86_64-linux and i686-linux, and install
into separate directory, it can compile small plugin demo, and demo plugin also
worked well;
but while writing a useful gcc plugin with FOR_EACH_LOOP from cfgloop.h, it
exited with error:
gcc -I.
-I/opt/gcc-4.5.0/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.5.0/plugin/include
-fPIC -c -o sensor_code_generators/univariate_polynomial.o
sensor_code_generators/univariate_polynomial.c
In file included from
/opt/gcc-4.5.0/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.5.0/plugin/include/rtl.h:48:0,
from
/opt/gcc-4.5.0/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.5.0/plugin/include/cfgloop.h:26,
from sensor_code_generators/univariate_polynomial.c:15:
/opt/gcc-4.5.0/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.5.0/plugin/include/rtl.def:336:1:
error: expected identifier before 'const'
In file included from
/opt/gcc-4.5.0/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.5.0/plugin/include/cfgloop.h:26:0,
from sensor_code_generators/univariate_polynomial.c:15:
/opt/gcc-4.5.0/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.5.0/plugin/include/rtl.h:98:39:
error: 'LAST_AND_UNUSED_RTX_CODE' undeclared here (not in a function)
sensor_code_generators/univariate_polynomial.c:92:1: warning: useless storage
class specifier in empty declaration
make: *** [sensor_code_generators/univariate_polynomial.o] Error 1
The very first error is "expected identifier before 'const'", due to "const"
keyword used as enumeration, in rtl.def,
Further speaking, CONST is defined to const in include/ansidecl.h, only when
without IN_GCC defined,
But if I use -DIN_GCC to compile my own plugin, it produced other more random
errors,
So I think the problem is because rtl.def ansidecl.h conflicts,
Searched one mail archive on this Feb 2010 is related, but the author didn't
tell how to "reorder",
http://www.mail-archive.com/gcc@gcc.gnu.org/msg49585.html
BTW: There may be other gcc-4.5.0 new plugin system bugs, I personally suggest
a new bugzilla component "gcc-plugin" for this category of bugs;
--
Summary: plugin compile error: rtl.def uses "const" keyword
because of "CONST" defined to "const" in
include/ansidecl.h
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: crquan at gmail dot com
GCC host triplet: native x86_64-linux and i686-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44056
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/44056] plugin compile error: rtl.def uses "const" keyword because of "CONST" defined to "const" in include/ansidecl.h
2010-05-10 11:01 [Bug c/44056] New: plugin compile error: rtl.def uses "const" keyword because of "CONST" defined to "const" in include/ansidecl.h crquan at gmail dot com
@ 2010-05-10 12:52 ` steven at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-05-10 12:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from steven at gcc dot gnu dot org 2010-05-10 12:51 -------
+1 for the idea of a new "plugin" category.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44056
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-10 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 11:01 [Bug c/44056] New: plugin compile error: rtl.def uses "const" keyword because of "CONST" defined to "const" in include/ansidecl.h crquan at gmail dot com
2010-05-10 12:52 ` [Bug c/44056] " steven at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).