diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-06-07 06:26:32 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-06-07 06:26:32 +0000 |
commit | c70f6ed31478e27420d2038d09f3a343422db22f (patch) | |
tree | 6aed42053a56ed0593bc263de6125d7efc67c493 /gcc/cpplex.c | |
parent | aec2ac46a748e1d224db7cf7ce05a4516918c8ff (diff) | |
download | gcc-c70f6ed31478e27420d2038d09f3a343422db22f.zip gcc-c70f6ed31478e27420d2038d09f3a343422db22f.tar.gz gcc-c70f6ed31478e27420d2038d09f3a343422db22f.tar.bz2 |
cpptrad.c (struct block, [...]): New.
* cpptrad.c (struct block, BLOCK_HEADER_LEN, BLOCK_LEN,
scan_parameters, save_replacement_text, replacement_length): New.
(scan_out_logical_line): Take a macro and save parameters if
non-NULL.
(_cpp_logical_line_trad): Update.
(_cpp_create_trad_definition): Update to handle function-like
macros.
* cpplex.c (new_buff): Update.
(struct dummy, DEFAULT_ALIGNMENT, CPP_ALIGN): Move...
* cpphash.h: ...here.
(CPP_ALIGN2, _cpp_save_parameter): New.
* cppmacro.c (save_parameter): Rename, export.
(parse_params): Update.
From-SVN: r54331
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 2baa3e0..0dd9d22 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -2011,19 +2011,6 @@ cpp_interpret_charconst (pfile, token, pchars_seen, unsignedp) #error BUFF_SIZE_UPPER_BOUND must be at least as large as MIN_BUFF_SIZE! #endif -struct dummy -{ - char c; - union - { - double d; - int *p; - } u; -}; - -#define DEFAULT_ALIGNMENT (offsetof (struct dummy, u)) -#define CPP_ALIGN(size, align) (((size) + ((align) - 1)) & ~((align) - 1)) - /* Create a new allocation buffer. Place the control block at the end of the buffer, so that buffer overflows will cause immediate chaos. */ static _cpp_buff * @@ -2035,7 +2022,7 @@ new_buff (len) if (len < MIN_BUFF_SIZE) len = MIN_BUFF_SIZE; - len = CPP_ALIGN (len, DEFAULT_ALIGNMENT); + len = CPP_ALIGN (len); base = xmalloc (len + sizeof (_cpp_buff)); result = (_cpp_buff *) (base + len); |