cpplib: understand long long constants in #if

Zack Weinberg zack@rabi.columbia.edu
Fri Jan 22 11:44:00 GMT 1999


This patch's primary purpose is to make cpplib understand long long
constants in #if (i.e. 12345678901234567890LL).  This is needed to
compile the current glibc snapshots with --enable-cpplib.  The patch
also does a bunch of cleanup on the number and character constant
parsing code in cppexp.c.

With this patch applied, egcs/--enable-cpplib bootstraps successfully
and compiles glibc.  The only regressions vs cccp are due to lack of
support for the -dM and -std switches in cpplib, and possibly also a
problem with #include_next, -pedantic, and C++.  I will be looking
into these soon.

zw

1999-01-22 13:54 -0500  Zack Weinberg  <zack@rabi.columbia.edu>

	* cppexp.c: 
	    (struct arglist): Removed.
	    (parse_number): Use HOST_WIDE_INT for the accumulator.
	    Allow two `l' suffixes unless C89.  Clean up.  Make
	    static.
	    (parse_charconst): New function broken out of cpp_lex.
	    Code cleaned up drastically.  Don't use a token_buffer.
	    (token_buffer): Removed.
	    (cpp_lex): Don't call parse_number on a constant string.
	    Use parse_charconst.
	    (cpp_parse_expr): Properly handle an ERROR op returned by
	    cpp_lex. 

begin-base64 644 cppexp.diff.gz
H4sICPjKqDYAA2NwcGV4cC5kaWZmAKUba1PbSPKzXfcjOmxdsJFFLMiDmMCG
JCRxHa/jUcneJuWV5bFRIUteS15gN+xvv+6eh0ayzGup3SCNZrp7+t09w9bW
43/q3XggrjoQTCbiarIa1F3XNS817/Xr18/a3rM1D7y1zouNzvpGzVv1XtQd
x6mYtQbeRufFemfNq799C+76Wst7Dg7+eglv39bhpzAOotlAwJsoCfxIrJ5v
46CIB+GwDnX32Qqcnocp4H+zVAxgmEwhSMbjWRwGfhbGI4jCNEshGcKFuL5M
poMULsPsHIIgQDJWAVae1d00m86CDPzpiGbDX3UXoDS2EourbJM+nPXef945
xgF/LHggjDOIRDzKzs0rrooTfLvB/2kPQ2TYEGhd7/SXo93eSfd/uziOg2Es
SuPwrnt60jvaPe6dHXRPzWaJOd7a89brDXA872XLaz9nBtFPcO5PYRan4SgW
g8kmDSFjcAMCw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