aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2014-08-20 04:12:58 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2014-08-20 04:12:58 +0000
commitdd3ff077ef4ae24b35d15da9ee474ba096652b4e (patch)
tree0c1fc6e6cfa20039a441e5673bfc094d0ad3fd96
parent8714cbc5c7ebd974538feca6bef64f6578d316e8 (diff)
downloadgcc-dd3ff077ef4ae24b35d15da9ee474ba096652b4e.zip
gcc-dd3ff077ef4ae24b35d15da9ee474ba096652b4e.tar.gz
gcc-dd3ff077ef4ae24b35d15da9ee474ba096652b4e.tar.bz2
cpplib.h (cpp_options): Use signed char.
* include/cpplib.h (cpp_options): Use signed char. * lex.c (_cpp_lex_direct): Don't warn in C++ mode. From-SVN: r214210
-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 6b8fe28..89c8406 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 b89ba20..9f87ff8 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 827cfb0..5366dad 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,