[PATCH 3/3] /cp 2018-05-14 Paolo Carlini

2019-05-14 Thread paolo
* decl.c (grokdeclarator): Fix value assigned to typespec_loc, use min_location. /testsuite 2018-05-14 Paolo Carlini * g++.dg/diagnostic/trailing1.C: New. --- gcc/cp/decl.c | 4 ++-- gcc/testsuite/g++.dg/diagnostic/trailing1.C | 5

[C++ Patch] Adjust one more error message to use rich_location::add_range

2018-07-02 Thread Paolo Carlini
->locations[ds_thread] in the error basing on the gnu bool and ensure that the caret always points to __thread. All in all, I don't think it's worth it... Thanks, Paolo. /// /cp 2018-07-02 Paolo Carlini * parser.c (set_and_check_decl_spec_loc): Use rich_locati

Re: [C++ Patch] More location fixes to grokdeclarator

2018-07-03 Thread Paolo Carlini
|| linemap_location_before_p (line_table, +locations[ds_restrict], loc))) loc = locations[ds_restrict]; Why not use min_location here? Indeed. Thus I successfully tested the below. Thanks, Paolo. // Index: cp/decl.c ===

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Paolo Carlini
in general we don't want to do - I see that in the case of cap it gives pretty obfuscated results for the last two tests (what the heck is __lambda3?!?). So, all in all, maybe print the name once, as parms, or something like that, for the time being? Or try to avoid %E altogether? Paolo.

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Paolo Carlini
with -Wshadow): int main() {   int x = 42;   auto lambda0 = [x]() { int x; }; } I'm thinking that the new diagnostic should be more consistent with it. Paolo.

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Paolo Carlini
Hi, On 08/07/2018 00:09, Ville Voutilainen wrote: On 8 July 2018 at 00:35, Paolo Carlini wrote: Hi, On 07/07/2018 23:20, Ville Voutilainen wrote: + error_at (DECL_SOURCE_LOCATION (old), + "capture %qD and lambda parameter %qD " +

[C++ Patch] Use rich_location::add_range in three more places

2018-07-08 Thread Paolo Carlini
Hi, noticed three additional error messages where an additional range seems appropriate. Tested x86_64-linux. Thanks, Paolo. // /cp 2018-07-08 Paolo Carlini * decl.c (grokdeclarator): Use rich_location::add_range in three more places; include gcc-rich

[C++ Patch] PR 59480 ("Missing error diagnostic: friend declaration specifying a default argument must be a definition")

2018-07-12 Thread Paolo Carlini
(check_redeclaration_no_default_args) which I added (rather) recently, and I'm exploiting that to allow two existing testcases to compile as they are. Tested x86_64-linux. Thanks, Paolo. / /cp 2019-07-12 Paolo Carlini PR c++/59480, DR 136 * d

[C++ Patch] Check permerror return value

2018-07-16 Thread Paolo Carlini
Hi, over the last weeks, while working on various diagnostic issues, I noticed a few defective permerror + inform pairs. Tested x86_64-linux. Thanks, Paolo. /cp 2018-07-16 Paolo Carlini * class.c (resolve_address_of_overloaded_function): Don't em

[C++ Patch] Another permerror related tweak

2018-07-17 Thread Paolo Carlini
Hi again, here I noticed a pair of consecutive permerrors (instead of permerror + inform) and also that the first one isn't exploiting DECL_SOURCE_LOCATION (which makes a real difference at least in a couple of cases which I'm explicitly testing below). Tested x86_64-linux. Tha

Re: [C++ Patch] PR 59480 ("Missing error diagnostic: friend declaration specifying a default argument must be a definition")

2018-07-19 Thread Paolo Carlini
Hi, On 19/07/2018 10:43, Rainer Orth wrote: Hi Paolo, the below resolves the bug report and its duplicates by implementing - in a rather straightforward way, I believe - the resolution of DR 136, which also made into C++17. Note that in the patch I used permerror instead of a plain error for

[C++ Patch] PR 59480 ("Missing error diagnostic: friend declaration specifying a default argument must be a definition")​ (Take 2)

2018-08-01 Thread Paolo Carlini
default arguments and we already diagnosed that, or it doesn't , thus isn't interesting anymore for the diagnostic at issue. Thanks! Paolo. /// /cp 2019-08-01 Paolo Carlini PR c++/59480, DR 136 * decl.c (check_no_redeclaration_friend_default_args

[C++ Patch] Prefer error + inform in four typeck.c places

2019-10-24 Thread Paolo Carlini
Hi, some additional straightforward bits in typeck.c, which I noticed when I went through the cp_build_binary_op callers. Tested x86_64-linux. Thanks, Paolo. // /cp 2019-10-24 Paolo Carlini * typeck.c (cp_build_modify_expr): Prefer error + inform to

[C++ Patch] Add location parameter to composite_pointer_type and use it

2019-10-31 Thread Paolo Carlini
x. Thanks, Paolo. /cp 2019-10-31 Paolo Carlini * typeck.c (composite_pointer_type): Add a const op_location_t& parameter and use it in diagnostics. (composite_pointer_error): Likewise. (composite_pointer_type_r): Add a const

Re: [C++ Patch] Add location parameter to composite_pointer_type and use it

2019-11-01 Thread Paolo Carlini
Hi again, On 31/10/19 16:56, Paolo Carlini wrote: Hi, yesterday I noticed that we want to forward the location parameter of cp_build_binary_op to composite_pointer_type and then composite_pointer_error. Note, for the time being at least, this is always for CPO_COMPARISON, the other two

[C++ Patch] Improve cp_truthvalue_conversion locations and more

2019-11-12 Thread Paolo Carlini
st_flags_t parameter to the latter and everything looks finally good for these testcases. Tested x86_64-linux. Thanks, Paolo. /cp 2019-11-12 Paolo Carlini * typeck.c (cp_truthvalue_conversion): Add tsubst_flags_t parameter and use it in calls; als

[C++ Patch] PR 92804 [10 Regression] ICE trying to use concept as a nested-name-specifier

2020-01-22 Thread Paolo Carlini
Hi, in this simple issue we either wrongly talked about variable template-id in c++17 mode or ICEd in c++2a. I think we simply want to handle concept-ids first, both as represented in c++17 mode and as represented in c++2a mode. Tested x86_64-linux. Thanks, Paolo

Re: [C++ Patch] PR 92804 [10 Regression] ICE trying to use concept as a nested-name-specifier

2020-01-22 Thread Paolo Carlini
Hi, On 22/01/20 17:27, Jason Merrill wrote: On 1/22/20 10:22 AM, Paolo Carlini wrote: Hi, in this simple issue we either wrongly talked about variable template-id in c++17 mode or ICEd in c++2a. I think we simply want to handle concept-ids first, both as represented in c++17 mode and as

Re: [C++ Patch] PR 92804 [10 Regression] ICE trying to use concept as a nested-name-specifier

2020-01-23 Thread Paolo Carlini
Hi, On 22/01/20 22:32, Jason Merrill wrote: On 1/22/20 3:31 PM, Paolo Carlini wrote: Hi, On 22/01/20 17:27, Jason Merrill wrote: On 1/22/20 10:22 AM, Paolo Carlini wrote: Hi, in this simple issue we either wrongly talked about variable template-id in c++17 mode or ICEd in c++2a. I think

[C++ Patch] PR 90915 [9/10 Regression] ICE in has_attribute, at c-family/c-attribs.c:4221

2020-01-29 Thread Paolo Carlini
her a DECL_ATTRIBUTES... Simply recognizing IDENTIFIER_NODEs and returning false works fine, not sure if we want to do something more sophisticated. Tested x86_64-linux. Thanks, Paolo. Fix "PR c++/90915 ICE in has_attribute, at c-family/c-attribs.c:4221" A rather s

Re: [C++ Patch] PR 90915 [9/10 Regression] ICE in has_attribute, at c-family/c-attribs.c:4221

2020-01-29 Thread Paolo Carlini
Hi, On 29/01/20 19:00, Jason Merrill wrote: On 1/29/20 4:31 AM, Paolo Carlini wrote: Hi, in this regression we issue a diagnostic about an incomplete type (only a warning by default) and then we crash when we try to query has_attribute on a member of the type because in such cases the

[C++ Patch] Improve build_functional_cast locations

2019-12-04 Thread Paolo Carlini
Hi, this exemplifies in a compact way the kind of change we can implement for the other casts too: near the end of cp_parser_functional_cast instead of using the combined_loc only for the returned cp_expr we can also pass it to build_functional_cast. Tested x86_64-linux. Thanks, Paolo

[C++ Patch] Improve build_*_cast locations

2019-12-06 Thread Paolo Carlini
Hi, as promised, the below takes care of the various remaining casts. It's mostly mechanical, follows the same approach used for build_functional_cast. Tested x86_64-linux. Thanks, Paolo. gcc/cp 2019-12-06 Paolo Carlini * typ

Re: [C++ Patch] Improve build_*_cast locations

2019-12-06 Thread Paolo Carlini
Hi, On 06/12/19 18:53, Jason Merrill wrote: On 12/6/19 11:14 AM, Paolo Carlini wrote: Hi, as promised, the below takes care of the various remaining casts. It's mostly mechanical, follows the same approach used for build_functional_cast. Tested x86_64-linux. It occurs to me that

Re: [C++ Patch] Improve build_*_cast locations

2019-12-09 Thread Paolo Carlini
doing that for a while... Anyway, the below passed testing. Thanks, Paolo. Index: gcc/cp/cp-tree.h === --- gcc/cp/cp-tree.h(revision 279041) +++ gcc/cp/cp-tree.h(working copy) @@ -6998,7

[C++ Patch] Improve throw, sizeof, and alignof locations & more

2019-12-16 Thread Paolo Carlini
few other minor changes, like two additional uses of DECL_SOURCE_LOCATION, cp_expr_loc_or_input_loc, removal of an unused function. Tested x86_64-linux. Thanks, Paolo. // /gcc/cp 2019-12-16 Paolo Carlini * typeck.c (cxx_sizeof_or_alignof_type): Add

[C++ Patch] Improve delete expressions locations

2019-12-20 Thread Paolo Carlini
Hi, more of the last idea, this time applied to cp_parser_delete_expression / delete_sanity (thus build_delete and build_vec_delete which provide tests). Nothing particularly remarkable in this case. Tested x86_64-linux. Thanks, Paolo. /// /gcc/cp 2019-12-20

[C++ Patch] Improve build_new locations

2020-01-02 Thread Paolo Carlini
, I'd rather work on that at a later time. Tested x86_64-linux. Thanks, Paolo. /// /gcc/cp 2020-01-02 Paolo Carlini * init.c (build_new): Add location_t parameter and use it throughout. (build_raw_new_expr): Likewise.

Re: [C++ Patch] Improve build_new locations

2020-01-07 Thread Paolo Carlini
Hi, On 06/01/20 21:47, Jason Merrill wrote: On 1/2/20 4:23 AM, Paolo Carlini wrote: @@ -19320,8 +19320,8 @@ tsubst_copy_and_build (tree t,     tree op1 = tsubst (TREE_OPERAND (t, 1), args, complain, in_decl);   tree op2 = RECUR (TREE_OPERAND (t, 2)); -    ret = build_new

Re: [PATCH RFA] build: drop target libs from LD_LIBRARY_PATH [PR105688]

2024-02-08 Thread Paolo Bonzini
t was broken, please consider this one instead: Yes, this one makes sense (and the current code would not work since it lacks the prev- prefix on TARGET_LIB_PATH). Paolo

[C++ Patch, committed as obvious] PR 58190

2013-08-20 Thread Paolo Carlini
Hi, simply matter of using __SIZE_TYPE__. Committed to mainline. Thanks, Paolo. /// 2013-08-20 Paolo Carlini PR c++/58190 * g++.dg/pr57878.C: Use __SIZE_TYPE__. Index: g++.dg/pr57878.C === --- g

Re: [C++ Patch, committed as obvious] PR 58190

2013-08-20 Thread Paolo Carlini
Hi, On 08/20/2013 01:48 PM, Jakub Jelinek wrote: On Tue, Aug 20, 2013 at 01:40:59PM +0200, Paolo Carlini wrote: simply matter of using __SIZE_TYPE__. Committed to mainline. Please apply it to branches/gcc-4_8-branch too. More information bug reporter didn't provide ;) Ok. Also note tha

[C++ testcase, committed] PR 56134

2013-08-21 Thread Paolo Carlini
Hi, in mainline we don't ICE anymore. Tested x86_64-linux multilib. Thanks, Paolo. 2013-08-21 Paolo Carlini PR c++/56134 * g++.dg/ext/attr-alias-3.C: New. Index: g++.dg/ext/attr-alia

[C++ Patch] PR 56130

2013-08-21 Thread Paolo Carlini
, because the warning is enabled by default. Booted and tested x86_64-linux. Thanks, Paolo. // /cp 2013-08-21 Paolo Carlini PR c++/56130 * semantics.c (finish_id_expression): Handle deprecated references. /testsuite 2013-08-21 Paolo Carlini PR c

Re: [C++ Patch] PR 56130

2013-08-21 Thread Paolo Carlini
Hi again, On 08/21/2013 03:45 PM, Paolo Carlini wrote: Hi, this bug points out that we fail to emit deprecated warnings when references are involved. Turns out that at the end of finish_id_expression the VAR_DECL is wrapped in INDIRECT_REF. The trivial patch below appears to work fine and

[C++ Patch, obvious] Consistently use INDIRECT_REF_P

2013-08-21 Thread Paolo Carlini
Hi, earlier today noticed three spots where we don't use the existing INDIRECT_REF_P predicate. I think the patch qualifies as obvious, and I'm going to apply it later today. Thanks, Paolo. / 2013-08-21 Paolo Carlini * call.c (build_new_met

Re: [Patch] Replace spaces with tabs in regex files

2013-08-22 Thread Paolo Carlini
On 08/22/2013 05:55 AM, Tim Shen wrote: I simply replace 8 spaces in indentation with a tab. Bootstrap passed. Ok, thanks! Paolo.

[C++ Patch] PR 56380

2013-08-22 Thread Paolo Carlini
tested x86_64-linux. Thanks, Paolo. // /cp 2013-08-22 Paolo Carlini PR c++/56380 * class.c (check_field_decls): Check for const mutable and const reference data members. /testsuite 2013-08-22 Paolo Carlini PR c++/56380 * g

Re: [C++ patch] Move FINAL flag to middle-end trees.

2013-08-22 Thread Paolo Carlini
inal (pun intended ;) decision? Thanks! Paolo.

Re: [PATCH, AArch64] Fix configure test for AArch64 dwarf2 debug_line

2013-08-22 Thread Paolo Carlini
n | cris | i386 | m32c | m68k | microblaze' make[1]: *** [configure-gcc] Error 1 Paolo.

Re: [PATCH, AArch64] Fix configure test for AArch64 dwarf2 debug_line

2013-08-22 Thread Paolo Carlini
.. missing backslashes I would say. Paolo.

Re: [PATCH, AArch64] Fix configure test for AArch64 dwarf2 debug_line

2013-08-22 Thread Paolo Carlini
... I'm testing the below. Works fine so far. I'm going to commit it as soon as a bootstrap on x86_64-linux completes again. Paolo. Index: configure.ac === --- configure.ac(revis

Re: [Patch 2/2] Localization problem in regex

2013-08-23 Thread Paolo Carlini
st the specific functions you are changing. It's important. Thanks, Paolo.

[C++ RFC / Patch] Another recursive template instantiation issue (c++/51488, etc)

2013-08-23 Thread Paolo Carlini
nspired by the use in maybe_instantiate_noexcept). In particular, I fear memory leaks or mismanagement (I see a ggc_free (tinst); in instantiate_alias_template which I don't fully understand). Also, I wonder if we could provide more detailed information... Thanks in

Re: [C++ patch] Move FINAL flag to middle-end trees.

2013-08-23 Thread Paolo Carlini
On 08/23/2013 03:47 PM, Jason Merrill wrote: On 08/22/2013 12:05 PM, Paolo Carlini wrote: Sorry if I'm saying something rather vague: I suppose you mean BINFO_FLAG_6? Because it's the last one. No, that's a language-specific flag. Ah great. Thanks! Paolo.

Re: [Patch 2/2] Localization problem in regex

2013-08-23 Thread Paolo Carlini
On 08/23/2013 03:59 PM, Tim Shen wrote: On Fri, Aug 23, 2013 at 6:29 PM, Paolo Carlini wrote: Thanks a lot indeed. But: "Fix callers" of *what*?!? And from *where*? To be really honest this kind of ChangeLog entry doesn't make much sense. Please get used to list the specific fu

Re: [Patch 2/2] Localization problem in regex

2013-08-23 Thread Paolo Carlini
On 08/23/2013 04:53 PM, Tim Shen wrote: On Fri, Aug 23, 2013 at 10:26 PM, Paolo Carlini wrote: Great. But please but the names of the functions you are changing between round brackets. You have tons of examples everywhere. ...like this? The assign change is fine. But I would also put between

Re: Type inheritance graph analysis & speculative devirtualization, part 4a/6 simple anonymous namespace devirtualization during cgraph construction

2013-08-23 Thread Paolo Carlini
Hi, On 08/23/2013 05:12 PM, Jan Hubicka wrote: +/* { dg-final { scan-tree-dump-nop "A::foo" 0 "ssa"} } */ This should be scan-tree-dump-not right? Paolo.

[C++ Patch] PR 54485

2013-08-25 Thread Paolo Carlini
Hi, this bug, filed by Diego, is about 8.3.6/6, where member functions of class templates, at variance with plain classes, do not admit default arguments on the out-of-class redeclaration. Tested x86_64-linux. Thanks, Paolo. // /cp 2013-08-25 Paolo Carlini

Re: Clean up pretty printers [18/n]

2013-08-26 Thread Paolo Carlini
in this scope make[2]: *** [c/c-objc-common.o] Error 1 If I don't hear from you I'm going to commit as obvious the below. Thanks! Paolo. Index: c-objc-common.c === --- c-objc-common.c (revis

Re: Clean up pretty printers [18/n]

2013-08-26 Thread Paolo Carlini
On 08/26/2013 11:20 AM, Gabriel Dos Reis wrote: You need more than that. The rest of patch is in trunk now. Sorry for the breakage -- as you probably guessed, I specified only c-family directory on the commit command line. Thanks! Paolo.

[C++ Patch] Remove old bison hack?!

2013-08-26 Thread Paolo Carlini
Hi, a few days ago I noticed this comment and code. Removing it passes testing on x86_64-linux (I would in any case also boot and test multilib before committing). Admittedly, a bit risky, but Stage 1 seems the right time to try. Thanks! Paolo. 2013-08-26 Paolo

[C++ Patch] PR 13981

2013-08-27 Thread Paolo Carlini
the inform would often not be that useful, depending on the target type, but in fact I tried and it *never* (X) triggers in our whole testsuite, thus I'm not that worried anymore ;) Tested x86_64-linux. Thanks, Paolo. (X) Without the class type check it would trigger 2 times in g++.old-dej

Re: RFA: Consider int and same-size short as equivalent vector components

2013-08-27 Thread Paolo Carlini
. Paolo.

[C++ Patch] PR 58255

2013-08-28 Thread Paolo Carlini
a3(2); /* Ok */ As expected, in such cases init is an INTEGER_CST, a NULL_TREE and a TREE_LIST of a single INTEGER_CST, respectively. Booted and tested x86_64-linux. Thanks, Paolo. / /cp 2013-08-28 Paolo Carlini PR c++/58255 * init.c (build_aggr

Re: Make some comdats implicitly hidden

2013-08-29 Thread Paolo Carlini
Hi, On 08/29/2013 10:11 AM, Jan Hubicka wrote: Paolo, there seems to be one extra issue about this patch. It causes quite a twist in libstdc++ exported symbols. It is purpose of the patch to remove those that are going to be generated in user programs, too. I am however bit confused about bad

Re: Make some comdats implicitly hidden

2013-08-29 Thread Paolo Carlini
bi failing, either a complete change, or nothing. Thanks! Paolo.

[C++ Patch] PR 51424

2013-08-29 Thread Paolo Carlini
matching (which looks inside CALL_EXPRs) would miss some cases, like when the self-delegation is only in the derived type, not in the base. Tested x86_64-linux. Thanks! Paolo. / /cp 2013-08-29 Paolo Carlini PR c++/51424 * cp-tree.h

Re: [C++ Patch] PR 51424

2013-08-30 Thread Paolo Carlini
Hi, On 08/29/2013 09:40 PM, Jason Merrill wrote: On 08/29/2013 11:24 AM, Paolo Carlini wrote: + if ((complain & tf_error) + && (flags & LOOKUP_DELEGATING_CONS) + && name == complete_ctor_identifier + && TREE_CODE (ret) == CALL_EXPR + &&

Re: PR 58148 patch

2013-08-30 Thread Paolo Carlini
I'm attaching below something I quickly hacked, untested, see if you like it in case commit something similar. Thanks! Paolo. // Index: functions.h === --- functions.h (revision 202068) +++ functions.h

Re: [C++ Patch] PR 51424

2013-08-30 Thread Paolo Carlini
Hi again, On 08/30/2013 11:06 AM, Paolo Carlini wrote: I could, for example pass down a separate bit, instead of playing again with the LOOKUP_* bits. At some point yesterday I even had that version tested ;) In practice, something like the attached. By the way, as regards this comment in cp

Re: [Patch] Rewrite regex matchers

2013-08-30 Thread Paolo Carlini
suite/21_strings is completely structured this way. Paolo.

Re: [Patch] Rewrite regex matchers

2013-08-30 Thread Paolo Carlini
example, when I see a bool sandwiched between big objects something seems at least weird... Let's make measurements and optimize for 64-bit but let's double check on 32-bit too. Paolo.

Re: [Patch] Rewrite regex matchers

2013-08-31 Thread Paolo Carlini
Hi, > wrote: >> Other than the test case (breaks on mingw32 target) this is looking >very sweet. > >Could you please show some details? I suppose he referred to the char/wchar_t split which I described... Thanks! Paolo

[C++ Patch] PR 21682 (DR 565)

2013-09-01 Thread Paolo Carlini
with c++/21682 (using24.C) and reject the testcase which I discussed in DR 565 (using25.C) (*) Booted & tested x86_64-linux. Thanks! Paolo. (*) Likewise current clang. // /cp 2013-09-01 Paolo Carlini PR c++/21682, implement DR 565 * name-look

Re: [C++ Patch] PR 21682 (DR 565)

2013-09-01 Thread Paolo Carlini
.. consider this withdrawn, I have to fix another very similar check elsewhere. Paolo.

[C++ Patch] PR 21682 (DR 565) (Take 2)

2013-09-01 Thread Paolo Carlini
Hi again, ... thus Take 2: the extended comparison per DR 565 must be used in push_overloaded_decl_1 too, in order to handle correctly the case of an using decl *followed* by a decl. I added a testcase too. Again booted and tested x86_64-linux. Thanks, Paolo. // /cp

[v3] libstdc++/58302

2013-09-03 Thread Paolo Carlini
Hi, a very stupid typo. Tested x86_64-linux, fixed in the active branches. Thanks, Paolo. // 2013-09-03 Paolo Carlini PR libstdc++/58302 * include/bits/random.tcc (negative_binomial_distribution<>:: operator()(_UniformRandomNumberGen

[C++ Patch] PR 58305

2013-09-03 Thread Paolo Carlini
; of g++.dg/parse/attr3.C. This seems wrong per our documentation, because those lines do not *name* the deprecated types E and F, but may make sense, for example clang++ *does* warn on those. Tested x86_64-linux. Thanks! Paolo. /cp 2013-09-03 Paolo Ca

Re: [C++ Patch] PR 58305

2013-09-03 Thread Paolo Carlini
.. unfortunately the issue isn't so easy because in any case we don't want to warn for typedefs of ToBeDeprecated. Paolo.

Re: [Patch] Rewrite _StateSeq in regex

2013-09-03 Thread Paolo Carlini
se ;) Thanks a lot for now, let's see if there are more (substantive) comments... Paolo.

Re: [C++ Patch] PR 58305

2013-09-03 Thread Paolo Carlini
On 09/03/2013 11:32 PM, Jason Merrill wrote: On 09/03/2013 11:10 AM, Paolo Carlini wrote: ToBeDeprecated(); I'd rather handle this case in build_functional_cast. Indeed. Thanks for the great tip. A tried to find a place where I could use the same check we have in grokdecla

[C++ Patch] PR 24926

2013-09-03 Thread Paolo Carlini
aggregates. The patch seems large but in fact just moves to a recursive helper the code that currently handles anonymous aggregates in finish_struct_anon. Patch appears to work well, no regressions etc, I'm not 100% sure we couldn't simplify a bit the new finish_struct_anon_r. Tha

Re: [C++ Patch] PR 24926

2013-09-04 Thread Paolo Carlini
ested x86_64-linux. Paolo. / Index: cp/class.c === --- cp/class.c (revision 202241) +++ cp/class.c (working copy) @@ -2773,15 +2773,96 @@ warn_hidden (tree t) } } +/* Recursive helper for finish_struct_anon. */ + +s

Re: [C++ Patch] PR 24926

2013-09-04 Thread Paolo Carlini
first time is called complain == true (thus does exactly what the current code does), then when the recursion proper starts, complain == false. Or you mean something else? Paolo.

Re: [C++ Patch] PR 24926

2013-09-04 Thread Paolo Carlini
, doesn't exist in the current code handling the fields of an anon aggr. All in all I rather prefer this kind of solution, in my opinion the typical recursion here is very shallow and in this way the amount of new code is minimized. Thanks, Paolo

Re: [patch] Make vector::at() assertion message more useful (try #2)

2013-09-04 Thread Paolo Carlini
" "this->size() (which is %zu)"), __n, this->size()); That seems worth exploring, I agree. Paolo.

Re: [patch] Make vector::at() assertion message more useful (try #2)

2013-09-04 Thread Paolo Carlini
Hi, On 09/05/2013 01:36 AM, Paul Pluzhnikov wrote: On Wed, Sep 4, 2013 at 4:26 PM, Paolo Carlini wrote: For sure concat_size would not be Ok, isn't uglified. I didn't uglify it because it's inside __gnu_cxx namespace. Does it still need uglification? Yes. snprintf_l

Re: [Patch] Rewrite _StateSeq in regex

2013-09-05 Thread Paolo Carlini
On 09/04/2013 05:37 AM, Tim Shen wrote: According to this email(http://gcc.gnu.org/ml/libstdc++/2013-09/msg5.html), I add a testcase. Thanks. Apparently there aren't further comments, thus please install it. Thanks again, Paolo.

[C++ Patch] PR 43452

2013-09-05 Thread Paolo Carlini
error (we used to ICE) but arguably we should only warn and explain the possible undefined behavior at runtime, consistently with what we do for the non-array variant of delete (clang and icc likewise warn). I tested the below on x86_64-linux. Thanks! Paolo. /// /cp 2013

Re: [RFC] Fix for PR58201

2013-09-06 Thread Paolo Carlini
date testresults are arriving only now on gcc-testresults confirming my finding, for example Andreas Schwab already posted a couple. Thanks! Paolo.

[C++ PATCH] Fix PR58300, issue with -fvtable-verify=preinit

2013-09-06 Thread Paolo Carlini
case, move call to assemble_vtv_preinit_initializer to after call to cgraph_process_new_functions. Thanks Caroline. Let's add Jason in CC, I almost missed the patch myself (and I was actively paying attention to the issue) Paolo.

Re: [RFC] Fix for PR58201

2013-09-07 Thread Paolo Carlini
and that this should be a very uncommon error message, but, I'm wondering, is it possible that other errors, for other issues, are also affected? That is, other diagnostic happening very late and sensitive to the recent rework? Paolo.

Re: [RFC] Fix for PR58201

2013-09-07 Thread Paolo Carlini
n the location is UNKNOWN? I don't think there are existing cases where it's sane to say :0:0 as "required from"!?! Short term at least, it would seem a good enough solution to me + a comment in testcase too. Then indeed as you explained in your last message before leaving (enjoy Pisa! All in all I spent there ~10 years!) we should audit, avoid as much as possible such late diagnostic, etc. What do you think? Paolo

Re: [RFC] Fix for PR58201

2013-09-07 Thread Paolo Carlini
proposed about UNKNOWN_LOCATION + the tweak to print_instantiation_partial_context_line (essentially just return immediately if loc == UNKNOWN_LOCATION, I think) Paolo.

Re: [PATCH, vtv update] Add documentation for --enable-vtable-verify configure option...

2013-09-07 Thread Paolo Carlini
-- Caroline, something seems wrong with the patch, I can't build anymore. Something in libvtv/testsuite: make[4]: Entering directory `/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libvtv/testsuite' Makefile:369: *** missing separator. Stop. Paolo.

Re: [PATCH, vtv update] Add documentation for --enable-vtable-verify configure option...

2013-09-07 Thread Paolo Carlini
Hi again, On 09/07/2013 10:41 PM, Paolo Carlini wrote: -- Caroline, something seems wrong with the patch, I can't build anymore. Something in libvtv/testsuite: make[4]: Entering directory `/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libvtv/testsuite' Ma

Re: [PATCH, vtv update] Add documentation for --enable-vtable-verify configure option...

2013-09-08 Thread Paolo Carlini
revert it. What would you say about the revision range? Paolo.

Re: [PATCH, vtv update] Add documentation for --enable-vtable-verify configure option...

2013-09-08 Thread Paolo Carlini
.. it's r202296 aka bootstrap/58340, Jeff is already on it. Paolo.

[diagnostic patch] PR 54941

2013-09-08 Thread Paolo Carlini
would often fail early, and should be rather efficient anyway because the second argument is known at compile-time. Tested x86_64-linux. Thanks, Paolo. 2013-09-08 Paolo Carlini PR c++/54941 * diagnostic.c (diagnostic_build_prefix): When s.fi

Re: [diagnostic patch] PR 54941

2013-09-08 Thread Paolo Carlini
Hi Gaby, On 09/08/2013 03:41 PM, Gabriel Dos Reis wrote: On Sun, Sep 8, 2013 at 8:00 AM, Paolo Carlini wrote: Hi all, Gaby, in this bug Manuel noticed that the zeros in the diagnostic lines of the form: :0:0: don't provide useful information. Thus the below just avoids printin

[Patch to gcc/function] PR 58362

2013-09-08 Thread Paolo Carlini
6_64-linux. Thanks! Paolo. PS: sorry, not 100% sure about the maintainers of this file, I'm adding a couple of CCs. 2013-09-09 Marc Glisse Paolo Carlini PR c++/58362 * function.c (do_warn_unused_parameter): Use DECL_SOURCE_LOCATION.

[C++ diagnostic Patch] Partially fix c++/58363 and more

2013-09-08 Thread Paolo Carlini
case of NULL second operand is handled correctly. What do you think about the below? Certainly passes the testsuite and the pretty printing for 58363 is Ok. Thanks! Paolo. /// 2013-09-08 Paolo Carlini * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.

Re: [Patch to gcc/function] PR 58362

2013-09-09 Thread Paolo Carlini
Hi Richard, On 09/09/2013 09:46 AM, Richard Biener wrote: On Sun, 8 Sep 2013, Paolo Carlini wrote: Hi, this patchlet fixes the column # of the unused parameter warnings emitted by do_warn_unused_parameter by explicitly passing DECL_SOURCE_LOCATION (decl) instead of wrongly relying on

Re: [Patch to gcc/function] PR 58362

2013-09-09 Thread Paolo Carlini
re or less what Marc & I & Manuel figured out, or we try to change the definition of location_of, which impacts a lot of code... Paolo.

Re: [Patch to gcc/function] PR 58362

2013-09-09 Thread Paolo Carlini
eter %qD", decl); no? Unless I misunderstand what %q+D should do. See my previous email Richard. The situation should be rather clear now. Paolo.

Re: [Patch to gcc/function] PR 58362

2013-09-09 Thread Paolo Carlini
u go to cp_printer for C++, thus location_of for C++. In C is different, but again there is, evidently, a mechanism which uses DECL_CONTEXT for PARM_DECLs which leads to an inaccurate location when we *really* want the location of the parameter (exactly as I explained for C++). Paolo.

Re: [Patch to gcc/function] PR 58362

2013-09-09 Thread Paolo Carlini
On 09/09/2013 12:08 PM, Paolo Carlini wrote: Everything happens via call backs. Thus from the generic diagnostic machinery, you go to cp_printer for C++, thus location_of for C++. In C is different, but again there is, evidently, a mechanism which uses DECL_CONTEXT for PARM_DECLs which leads

Re: [Patch to gcc/function] PR 58362

2013-09-09 Thread Paolo Carlini
lying on '+' in this case (like in *many* existing others) doesn't work, because, in C++, location_of does t = DECL_CONTEXT (t) which is almost right but not really, we want the location of the PARM_DECL. The C front-end does something very similar (as the inaccurate location shows). What do you think? Paolo.

Re: [C++ Patch] PR 43452

2013-09-09 Thread Paolo Carlini
Hi, On 09/09/2013 06:35 AM, Jason Merrill wrote: On 09/05/2013 06:44 PM, Paolo Carlini wrote: + && warning (0, "possible problem detected in invocation of " + "delete [] operator:")) The warning should probably be suppressible by some flag. In fa

  1   2   3   4   5   6   7   8   9   10   >