Re: code gen for C string literals

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

 



kevin diggs <diggskevin38@xxxxxxxxx> writes:

> I would like to play with the code gcc generates for string literals.
> Can someone point me to the relevant files and/or to some
> documentation that describes the inner workings?

The preprocessor turns a string literal into a CPP_STRING token.  The
parser turns that into a STRING_CST node in GENERIC.  The RTL expander
stores the string constant into the constant pool and works with a
symbol pointing to the address.

This and the various string literal optimizations are scattered across
various files.  Search for CPP_STRING and STRING_CST to see the kinds of
things that gcc does.

Ian


[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