__builtin_constant_p() and string literals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux