__builtin_constant_p() and string literals
Florian Weimer
fw@deneb.enyo.de
Sat Oct 18 13:45:00 GMT 2003
If __builtin_constant_p() is invoked in an inline function, it's not
possible to tell if a char* argument is the value of a string literal.
For security reasons, I want to ensure that certain functions are only
called with arguments which are string literals (and not dynamically
constructed strings). Is there a way to achieve that without using
macros?
How hard would it be to implement such functionality in GCC if it's not
there yet?
More information about the Gcc-help
mailing list