More on type qualifiers ignored on function return type
Jim Marshall
jim.marshall@wbemsolutions.com
Tue Jun 12 17:11:00 GMT 2007
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
More information about the Gcc-help
mailing list