aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
authorNeil Booth <neilb@earthling.net>2000-11-27 19:08:36 +0000
committerNeil Booth <neil@gcc.gnu.org>2000-11-27 19:08:36 +0000
commit6a6b162822130013ab558c9bb4dda88874ee48f1 (patch)
tree376dab862876e9b09630f6d229b81ba1eeb2fa61 /gcc/cppmacro.c
parentfb6a7b08a80113867aaeaa3d4dc6bcade0a57699 (diff)
downloadgcc-6a6b162822130013ab558c9bb4dda88874ee48f1.zip
gcc-6a6b162822130013ab558c9bb4dda88874ee48f1.tar.gz
gcc-6a6b162822130013ab558c9bb4dda88874ee48f1.tar.bz2
cppinit.c (cpp_reader_init): Remove handling of warn_paste command line options.
* cppinit.c (cpp_reader_init): Remove handling of warn_paste command line options. (cpp_handle_option): Similarly. * cpplib.h (struct cpp_options): Remove warn_paste. * cppmacro.c (paste_tokens): Apart from assembler, make unpasteable token warning mandatory. From-SVN: r37804
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index af520ef0..f9291bc 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -379,17 +379,20 @@ paste_tokens (pfile, lhs, rhs)
if (type == CPP_EOF)
{
- if (CPP_OPTION (pfile, warn_paste))
+ /* Mandatory warning for all apart from assembler. */
+ if (CPP_OPTION (pfile, lang) != CLK_ASM)
cpp_warning (pfile,
"pasting \"%s\" and \"%s\" does not give a valid preprocessing token",
cpp_token_as_text (pfile, lhs),
cpp_token_as_text (pfile, rhs));
/* The standard states that behaviour is undefined. By the
- principle of least surpise, we step back before the RHS, and
- mark it to prevent macro expansion. Tests in the testsuite
- rely on clearing PREV_WHITE here, though you could argue we
- should actually set it. */
+ principle of least surpise, we step back before the RHS, and
+ mark it to prevent macro expansion. Tests in the testsuite
+ rely on clearing PREV_WHITE here, though you could argue we
+ should actually set it. Assembler can have '.' in labels and
+ so requires that we don't insert spaces there. Maybe we should
+ change this to put out a space unless it's assembler. */
rhs->flags &= ~PREV_WHITE;
rhs->flags |= NO_EXPAND;
return 1;