summaryrefslogtreecommitdiffstats
path: root/gcc/cppexp.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-24 21:49:34 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-24 21:49:34 +0000
commit6269e47ee11ccb2170e24d6a9931be6f7a8e222b (patch)
treecad67533cd08c325707ca5aac9c99844289bff1a /gcc/cppexp.c
parentaee16bdaede2574ad30cc6b39e1a9a93fa53c878 (diff)
downloadppe42-gcc-6269e47ee11ccb2170e24d6a9931be6f7a8e222b.tar.gz
ppe42-gcc-6269e47ee11ccb2170e24d6a9931be6f7a8e222b.zip
* cppexp.c: Warn about unary + if -Wtraditional.
* cpplex.c (lex_line): Always set BOL on the first token of a line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35239 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r--gcc/cppexp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index e80f8e882e3..b3442470e36 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -849,6 +849,10 @@ _cpp_parse_expr (pfile)
top->value = v2;
top->unsignedp = unsigned2;
top->flags |= HAVE_VALUE;
+
+ if (CPP_WTRADITIONAL (pfile))
+ cpp_warning (pfile,
+ "traditional C rejects the unary plus operator");
}
else
{
OpenPOWER on IntegriCloud