* cpphash.h (struct cpp_reader): New saved_flags.
* cppmacro.c (cpp_get_token): Use saved_flags to remember
to avoid a paste after a pasted token.
From-SVN: r39366
+2001-01-31 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * cpphash.h (struct cpp_reader): New saved_flags.
+ * cppmacro.c (cpp_get_token): Use saved_flags to remember
+ to avoid a paste after a pasted token.
+
2001-01-31 Alexandre Oliva <aoliva@redhat.com>
* libgcc2.h (Wtype_MAX, Wtype_MIN): Define.
/* We're printed a warning recommending against using #import. */
unsigned char import_warning;
+ /* Used to flag the token after a paste AVOID_LPASTE. */
+ unsigned char saved_flags;
+
/* True after cpp_start_read completes. Used to inhibit some
warnings while parsing the command line. */
unsigned char done_initializing;
cpp_reader *pfile;
cpp_token *token;
{
- unsigned char flags = 0;
+ unsigned char flags = pfile->saved_flags;
+
+ pfile->saved_flags = 0;
for (;;)
{
*token = *context->list.first++;
/* PASTE_LEFT tokens can only appear in macro expansions. */
if (token->flags & PASTE_LEFT)
- paste_all_tokens (pfile, token);
+ {
+ paste_all_tokens (pfile, token);
+ pfile->saved_flags = AVOID_LPASTE;
+ }
}
else
{