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]

More on type qualifiers ignored on function return type


I have read up on this warning on the newsgroup and google. I understand the reasoning behind adding the warning, however; it is having a rather sad affect on our code base, which use to compile warning free (on Linux) with the 3.x compiler but now we get more warnings then stars in the night sky ;)

Basically we had been using the const qualifier on some function return types as informative to the user of API that the return value should not be freed or modified.

So the primary question is: is there a compiler switch we can use to stop this specific warning from being displayed?

second, and obviously off topic, If we wanted to change our code what would you recommend to indicate that the return value should not be modified or freed (I read a little about __attribute__const but didn't really follow what it was for exactly).

Thanks - I hope this is a bit more intelligent then my last post :(

-Jim


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