summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog14
-rw-r--r--libcpp/directives.c4
-rw-r--r--libcpp/expr.c6
-rw-r--r--libcpp/include/cpplib.h8
-rw-r--r--libcpp/init.c6
-rw-r--r--libcpp/internal.h6
-rw-r--r--libcpp/macro.c6
7 files changed, 32 insertions, 18 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 6771e1f942d..3b6f4fae9d8 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-29 Joseph Myers <joseph@codesourcery.com>
+
+ * include/cpplib.h (cpp_options): Rename warn_deprecated,
+ warn_traditional, warn_long_long and pedantic.
+ * directives.c (directive_diagnostics, _cpp_handle_directive):
+ Update names of cpp_options members.
+ * expr.c (cpp_classify_number, eval_token): Update names of
+ cpp_options members.
+ * init.c (cpp_create_reader, post_options): Update names of
+ cpp_options members.
+ * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
+ cpp_options members.
+ * macro.c (parse_params): Update names of cpp_options members.
+
2010-09-15 Ian Lance Taylor <iant@google.com>
* init.c: Fix type name in comment.
diff --git a/libcpp/directives.c b/libcpp/directives.c
index 997737bd4da..3d128554c12 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -354,7 +354,7 @@ directive_diagnostics (cpp_reader *pfile, const directive *dir, int indented)
cpp_error (pfile, CPP_DL_PEDWARN, "#%s is a GCC extension", dir->name);
else if (((dir->flags & DEPRECATED) != 0
|| (dir == &dtable[T_IMPORT] && !CPP_OPTION (pfile, objc)))
- && CPP_OPTION (pfile, warn_deprecated))
+ && CPP_OPTION (pfile, cpp_warn_deprecated))
cpp_warning (pfile, CPP_W_DEPRECATED,
"#%s is a deprecated GCC extension", dir->name);
}
@@ -400,7 +400,7 @@ _cpp_handle_directive (cpp_reader *pfile, int indented)
if (was_parsing_args)
{
- if (CPP_OPTION (pfile, pedantic))
+ if (CPP_OPTION (pfile, cpp_pedantic))
cpp_error (pfile, CPP_DL_PEDWARN,
"embedding a directive within macro arguments is not portable");
pfile->state.parsing_args = 0;
diff --git a/libcpp/expr.c b/libcpp/expr.c
index d2f6c3cf0ac..d2fec2a56a6 100644
--- a/libcpp/expr.c
+++ b/libcpp/expr.c
@@ -418,7 +418,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token)
{
int u_or_i = (result & (CPP_N_UNSIGNED|CPP_N_IMAGINARY));
int large = (result & CPP_N_WIDTH) == CPP_N_LARGE
- && CPP_OPTION (pfile, warn_long_long);
+ && CPP_OPTION (pfile, cpp_warn_long_long);
if (u_or_i || large)
cpp_warning (pfile, large ? CPP_W_LONG_LONG : CPP_W_TRADITIONAL,
@@ -427,7 +427,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token)
}
if ((result & CPP_N_WIDTH) == CPP_N_LARGE
- && CPP_OPTION (pfile, warn_long_long))
+ && CPP_OPTION (pfile, cpp_warn_long_long))
{
const char *message = CPP_OPTION (pfile, cplusplus)
? N_("use of C++0x long long integer constant")
@@ -814,7 +814,7 @@ eval_token (cpp_reader *pfile, const cpp_token *token)
if (CPP_PEDANTIC (pfile))
cpp_error (pfile, CPP_DL_PEDWARN,
"assertions are a GCC extension");
- else if (CPP_OPTION (pfile, warn_deprecated))
+ else if (CPP_OPTION (pfile, cpp_warn_deprecated))
cpp_warning (pfile, CPP_W_DEPRECATED,
"assertions are a deprecated extension");
}
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 87d368e2925..7c39a83b875 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -319,7 +319,7 @@ struct cpp_options
unsigned char print_include_names;
/* Nonzero means complain about deprecated features. */
- unsigned char warn_deprecated;
+ unsigned char cpp_warn_deprecated;
/* Nonzero means warn if slash-star appears in a comment. */
unsigned char warn_comments;
@@ -336,10 +336,10 @@ struct cpp_options
/* Nonzero means warn about various incompatibilities with
traditional C. */
- unsigned char warn_traditional;
+ unsigned char cpp_warn_traditional;
/* Nonzero means warn about long long numeric constants. */
- unsigned char warn_long_long;
+ unsigned char cpp_warn_long_long;
/* Nonzero means warn about text after an #endif (or #else). */
unsigned char warn_endif_labels;
@@ -383,7 +383,7 @@ struct cpp_options
unsigned char std;
/* Nonzero means give all the error messages the ANSI standard requires. */
- unsigned char pedantic;
+ unsigned char cpp_pedantic;
/* Nonzero means we're looking at already preprocessed code, so don't
bother trying to do macro expansion and whatnot. */
diff --git a/libcpp/init.c b/libcpp/init.c
index 1a0a64f2b58..cfc16e8f8d4 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -160,8 +160,8 @@ cpp_create_reader (enum c_lang lang, hash_table *table,
CPP_OPTION (pfile, operator_names) = 1;
CPP_OPTION (pfile, warn_trigraphs) = 2;
CPP_OPTION (pfile, warn_endif_labels) = 1;
- CPP_OPTION (pfile, warn_deprecated) = 1;
- CPP_OPTION (pfile, warn_long_long) = 0;
+ CPP_OPTION (pfile, cpp_warn_deprecated) = 1;
+ CPP_OPTION (pfile, cpp_warn_long_long) = 0;
CPP_OPTION (pfile, dollars_in_ident) = 1;
CPP_OPTION (pfile, warn_dollars) = 1;
CPP_OPTION (pfile, warn_variadic_macros) = 1;
@@ -698,7 +698,7 @@ post_options (cpp_reader *pfile)
{
/* -Wtraditional is not useful in C++ mode. */
if (CPP_OPTION (pfile, cplusplus))
- CPP_OPTION (pfile, warn_traditional) = 0;
+ CPP_OPTION (pfile, cpp_warn_traditional) = 0;
/* Permanently disable macro expansion if we are rescanning
preprocessed text. Read preprocesed source in ISO mode. */
diff --git a/libcpp/internal.h b/libcpp/internal.h
index 9209b55def0..e0ac285d82c 100644
--- a/libcpp/internal.h
+++ b/libcpp/internal.h
@@ -1,6 +1,6 @@
/* Part of CPP library.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
- 2008, 2009 Free Software Foundation, Inc.
+ 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -526,8 +526,8 @@ cpp_in_system_header (cpp_reader *pfile)
{
return pfile->buffer ? pfile->buffer->sysp : 0;
}
-#define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic)
-#define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional)
+#define CPP_PEDANTIC(PF) CPP_OPTION (PF, cpp_pedantic)
+#define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, cpp_warn_traditional)
static inline int cpp_in_primary_file (cpp_reader *);
static inline int
diff --git a/libcpp/macro.c b/libcpp/macro.c
index 31de4156c64..d9324a350ef 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -1,7 +1,7 @@
/* Part of CPP library. (Macro and #define handling.)
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Per Bothner, 1994.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -1589,13 +1589,13 @@ parse_params (cpp_reader *pfile, cpp_macro *macro)
pfile->spec_nodes.n__VA_ARGS__);
pfile->state.va_args_ok = 1;
if (! CPP_OPTION (pfile, c99)
- && CPP_OPTION (pfile, pedantic)
+ && CPP_OPTION (pfile, cpp_pedantic)
&& CPP_OPTION (pfile, warn_variadic_macros))
cpp_pedwarning
(pfile, CPP_W_VARIADIC_MACROS,
"anonymous variadic macros were introduced in C99");
}
- else if (CPP_OPTION (pfile, pedantic)
+ else if (CPP_OPTION (pfile, cpp_pedantic)
&& CPP_OPTION (pfile, warn_variadic_macros))
cpp_pedwarning (pfile, CPP_W_VARIADIC_MACROS,
"ISO C does not permit named variadic macros");