This is the mail archive of the
mailing list for the SID project.
Re: [patch]: RFA: Remove compile time warnings in cgen-cpu.h
- From: Nick Clifton <nickc at redhat dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: sid at sources dot redhat dot com
- Date: Wed, 13 Apr 2005 12:10:37 +0100
- Subject: Re: [patch]: RFA: Remove compile time warnings in cgen-cpu.h
- References: <email@example.com> <20050413110255.GB13326@redhat.com>
But in C++, it is valid to return a void value from a void function.
What compiler version barfs on this?
Good question - I am not actually sure. It was reported by a remotely
run job using the MCR system on a host which has at least two different
C++ compilers installed on it. I think however that it was using the
compiler in /usr/bin, which is:
c++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-49)
The actual error message was, for example:
"cgen-cpu.h:209: error: return-statement with a value, in function
So the compiler believes that the expressions are not void. Possibly
this is a bug ?
In any case I assume that there is no reason not to have the return
keyword since it is not doing anything ?
The second is that it uses the "reinterpret_cast<>" operator to
convert between integer types and floating point types, which for
some versions of GCC at least, does not work. [...]
Sure. (Actually, does any cgen/sid port use floating-point?)
No idea, but the same c++ compiler generated error messages for these
casts that looked like this:
"cgen-cpu.h:193: error: invalid cast from type 'sid::host_int_4' to
Come to think of it, the subject of this thread really should have been
"fix compile time errors for an old C++ compiler" or something like that.