aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2019-10-17 20:00:38 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2019-10-17 20:00:38 +0000
commitac4c7868f1032bb9184cd9a59ee17845f6f456c6 (patch)
tree087cdb040fedacacd6a432cb39fa755b1100c9e9 /gcc/cp/error.c
parent8228c8f2a54be12c70070d4eb2cd64483782b138 (diff)
downloadgcc-ac4c7868f1032bb9184cd9a59ee17845f6f456c6.zip
gcc-ac4c7868f1032bb9184cd9a59ee17845f6f456c6.tar.gz
gcc-ac4c7868f1032bb9184cd9a59ee17845f6f456c6.tar.bz2
decl.c (grokfndecl): Remove redundant use of in_system_header_at.
/cp 2019-10-17 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (grokfndecl): Remove redundant use of in_system_header_at. (compute_array_index_type_loc): Likewise. (grokdeclarator): Likewise. * error.c (cp_printer): Likewise. * lambda.c (add_default_capture): Likewise. * parser.c (cp_parser_primary_expression): Likewise. (cp_parser_selection_statement): Likewise. (cp_parser_toplevel_declaration): Likewise. (cp_parser_enumerator_list): Likewise. (cp_parser_using_declaration): Likewise. (cp_parser_member_declaration): Likewise. (cp_parser_exception_specification_opt): Likewise. (cp_parser_std_attribute_spec): Likewise. * pt.c (do_decl_instantiation): Likewise. (do_type_instantiation): Likewise. * typeck.c (cp_build_unary_op): Likewise. * decl.c (check_tag_decl): Pass to in_system_header_at the same location used for the permerror. (grokdeclarator): Likewise. * decl.c (check_tag_decl): Use locations[ds_typedef] in error_at. /testsuite 2019-10-17 Paolo Carlini <paolo.carlini@oracle.com> * g++.old-deja/g++.other/decl9.C: Check locations too. From-SVN: r277133
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 1fd87d2..30166f9 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -4317,10 +4317,7 @@ cp_printer (pretty_printer *pp, text_info *text, const char *spec,
void
maybe_warn_cpp0x (cpp0x_warn_str str)
{
- if ((cxx_dialect == cxx98) && !in_system_header_at (input_location))
- /* We really want to suppress this warning in system headers,
- because libstdc++ uses variadic templates even when we aren't
- in C++0x mode. */
+ if (cxx_dialect == cxx98)
switch (str)
{
case CPP0X_INITIALIZER_LISTS: