summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-20 04:12:58 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-20 04:12:58 +0000
commit4c860a45b9d409a75fadabe31de6eb736b813807 (patch)
tree0c1fc6e6cfa20039a441e5673bfc094d0ad3fd96 /libcpp
parent9a94da9c8eb3b5f1e7c246aa92096e27e0961c99 (diff)
downloadgcc-4c860a45b9d409a75fadabe31de6eb736b813807.tar.gz
* include/cpplib.h (cpp_options): Use signed char.
* lex.c (_cpp_lex_direct): Don't warn in C++ mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214210 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog5
-rw-r--r--libcpp/include/cpplib.h2
-rw-r--r--libcpp/lex.c1
3 files changed, 7 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 6b8fe2835a3..89c840658f0 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-20 Marek Polacek <polacek@redhat.com>
+
+ * include/cpplib.h (cpp_options): Use signed char.
+ * lex.c (_cpp_lex_direct): Don't warn in C++ mode.
+
2014-08-19 Marek Polacek <polacek@redhat.com>
* lex.c (_cpp_lex_direct): Fix a typo.
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index b89ba200699..9f87ff8b514 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -467,7 +467,7 @@ struct cpp_options
bool restore_pch_deps;
/* True if warn about differences between C90 and C99. */
- char cpp_warn_c90_c99_compat;
+ signed char cpp_warn_c90_c99_compat;
/* Dependency generation. */
struct
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 827cfb0d75f..5366dad9e44 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -2338,6 +2338,7 @@ _cpp_lex_direct (cpp_reader *pfile)
}
/* Or if specifically desired via -Wc90-c99-compat. */
else if (CPP_OPTION (pfile, cpp_warn_c90_c99_compat) > 0
+ && ! CPP_OPTION (pfile, cplusplus)
&& ! buffer->warned_cplusplus_comments)
{
cpp_error (pfile, CPP_DL_WARNING,