Re: [C++ Patch] Remove most uses of in_system_header_at

2019-10-17 Thread Jason Merrill
On 10/17/19 11:30 AM, Paolo Carlini wrote: .. hi again. We have an issue with this idea which I didn't notice earlier today: there are some libstdc++ *_neg testcases which rely on permerrors being emitted for code in library headers. For example 20_util/ratio/cons/cons_overflow_neg.cc relies

Re: [C++ Patch] Remove most uses of in_system_header_at

2019-10-17 Thread Paolo Carlini
.. hi again. We have an issue with this idea which I didn't notice earlier today: there are some libstdc++ *_neg testcases which rely on permerrors being emitted for code in library headers. For example 20_util/ratio/cons/cons_overflow_neg.cc relies on a permerror for the "overflow in constan

Re: [C++ Patch] Remove most uses of in_system_header_at

2019-10-17 Thread Paolo Carlini
Hi, On 17/10/19 05:15, Jason Merrill wrote: On 10/16/19 11:59 AM, Paolo Carlini wrote: ... the below, slightly extended patch: 1- Makes sure the in_system_header_at calls surviving in decl.c get the same location used for the corresponding diagnostic Hmm, we probably want to change permerror t

Re: [C++ Patch] Remove most uses of in_system_header_at

2019-10-16 Thread Jason Merrill
On 10/16/19 11:59 AM, Paolo Carlini wrote: ... the below, slightly extended patch: 1- Makes sure the in_system_header_at calls surviving in decl.c get the same location used for the corresponding diagnostic Hmm, we probably want to change permerror to respect warn_system_headers like warning

Re: [C++ Patch] Remove most uses of in_system_header_at

2019-10-16 Thread Paolo Carlini
... the below, slightly extended patch: 1- Makes sure the in_system_header_at calls surviving in decl.c get the same location used for the corresponding diagnostic; exploit locations[ds_typedef] in an error_at in grokdeclarator. Tested, as usual, on x86_64-linux. Thanks, Paolo. /

Re: [C++ Patch] Remove most uses of in_system_header_at

2019-10-14 Thread Paolo Carlini
Hi, On 12/10/19 00:28, Jakub Jelinek wrote: @@ -10036,8 +10035,6 @@ compute_array_index_type_loc (location_t name_loc, indicated by the state of complain), so that another substitution can be found. */ return error_mark_node; - else if (in_syste

Re: [C++ Patch] Remove most uses of in_system_header_at

2019-10-11 Thread Jakub Jelinek
On Fri, Oct 11, 2019 at 11:48:27PM +0200, Paolo Carlini wrote: > --- decl.c(revision 276903) > +++ decl.c(working copy) > @@ -9328,7 +9328,6 @@ grokfndecl (tree ctype, > } > /* 17.6.3.3.5 */ > if (suffix[0] != '_' > - && !in_system_header_at (location) >

[C++ Patch] Remove most uses of in_system_header_at

2019-10-11 Thread Paolo Carlini
Hi, as promised, this removes most uses of the predicate. I left alone the two occurrences in decl.c which guard permerrors, not warnings, and two more in parser.c which should be a (minor) optimization (particularly that in cp_parser_cast_expression). Tested x86_64-linux. Thanks, Paolo. /