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]

__builtin_constant_p() and string literals


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?


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