This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: How to use C89 with certain C99 features



Yes, failure conditions have to be reported, but I disagree
that __FILE__ is part of a failure message, because the user
should not be expected to read the sources to understand a
message (also, a source code identifier, such as a unique version
number, is additionally needed in this case).
Why not include __FUNCTION__, __func__ or __PRETTY_FUNCTION__, if
avialable? I think usually very helpful (if avialable) but also
not portable (to C89), AFAIK.

Well, firstly, I figure the only people who should be running the Wikipedia bot are people who should be able to cope with such an error message, and probably fix the problem themselves, and the idea of an error message is to be as helpful as possible. If __FUNCTION__ isn't portable, I ain't using it.


You cannot have const members with runtime data.
As I understand it, the "small old" compilers may locate
const data into ROM (or other RO memory), which makes it
impossible to initialize it with runtime data, so again the
problem may not be the compiler language / version, but
properties of the equipment. If you want your code to be runable
on such systems, you cannot use it.

Yeah, you're right. I think the correct idea is to un-const all struct members.


possibility to run it on exotic platforms. Maybe it is simply not
needed to be able to run a Wikipedia Web Bot on a microwave oven?

Ha ha.


Richard



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