This is the mail archive of the sid@sources.redhat.com mailing list for the SID project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch]: RFA: Remove compile time warnings in cgen-cpu.h


Hi Frank,

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 returning 'void'"

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 type 'cgen::SF'"

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.

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]