This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: "declaration does not declare anything"?
- From: Tom Tromey <tromey at redhat dot com>
- To: Adam Megacz <gcj at lists dot megacz dot com>
- Cc: java at gcc dot gnu dot org
- Date: 10 Dec 2001 12:13:40 -0700
- Subject: Re: "declaration does not declare anything"?
- References: <86heqzx6yh.fsf@megacz.com>
- Reply-to: tromey at redhat dot com
>>>>> "Adam" == Adam Megacz <gcj@lists.megacz.com> writes:
Adam> Hrm, I've never seen this before... can anybody give me a hint as to
Adam> what the compiler is trying to tell me? This seems to only show up
Adam> when crosscompiling...
Adam> java/lang/Thread.h:69: declaration does not declare anything
Adam> java/lang/Thread.h:69: storage class specified for typename
Adam> java/lang/Thread.h:69: parse error before numeric constant
Adam> java/lang/Thread.h:70: declaration does not declare anything
Adam> java/lang/Thread.h:70: storage class specified for typename
Adam> java/lang/Thread.h:70: parse error before numeric constant
The best way to debug a problem like this is to invoke the compiler
with `-E' (I remove the .o and .lo files, then run make, then
cut-and-paste the command line) and look at the source that comes out
of the preprocessor.
Adam> Relevant source lines:
Adam> static const jint MAX_PRIORITY = 10L;
Adam> static const jint MIN_PRIORITY = 1L;
Adam> static const jint NORM_PRIORITY = 5L;
I'm guessing some #include defines MIN_PRIORITY and MAX_PRIORITY.
There are a few plausible ways to fix this. One would be to add a new
rule for the header to Makefile.am which adds a -prepend to #undef the
symbols.
Tom