Preprocess constants.
Alexandre Oliva
aoliva@redhat.com
Fri Jun 29 21:33:00 GMT 2001
On Jun 29, 2001, Paul Faure <paul@engsoc.org> wrote:
> Why will this code not compile ? Can GCC not figure out the strlen() of a
> constant string at preprocess time ?
The result of a function call is never a compile-time constant, even
though you may know it is. Consider applying the sizeof operator to
the string, so that you get a constant expression as per the Standard
definition.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc-help
mailing list