[C++ testcase] PR 43663

2012-10-10 Thread Paolo Carlini
Hi, I'm committing the testcase and closing the PR as fixed. Tested x86_64-linux. Thanks, Paolo. / 2012-10-10 Paolo Carlini PR c++/43663 * g++.dg/init/bitfield3.C: New. Index: g++.dg/init/bitfie

[C++ testcase] PR 43765

2012-10-11 Thread Paolo Carlini
Hi, I'm committing the testcase and closing the PR as fixed in mainline. Thanks, Paolo. /// 2012-10-11 Paolo Carlini PR c++/43765 * g++.dg/parse/pr43765.C: New. Index: g++.dg/parse/pr43

[v3] std::common_type testsuite tweaks

2012-10-11 Thread Paolo Carlini
Hi contributed by Daniel. Tested again and committed. Paolo. /// 2012-10-11 Daniel Krugler * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc: Update / extend. * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:

[C++ testcase] PR 36107

2012-10-11 Thread Paolo Carlini
Hi, testcase added to testsuite, PR closed as fixed. Thanks, Paolo. / 2012-10-11 Paolo Carlini PR c++/36107 * g++.dg/ext/weak5.C: New. Index: g++.dg/ext/weak5.C === --- g++.dg/ext/weak5.C

[v3] Remove hack for 53067 in mainline

2012-10-11 Thread Paolo Carlini
Hi, not necessary anymore thanks to the resolution of c++/51213. Tested x86_64-linux multilib, committed. Thanks, Paolo. /// 2012-10-12 Paolo Carlini * include/bits/hashtable_policy.h: Revert libstdc++/53067 quick hacks thanks to the resolution of c

[C++ testcase] PR 51878

2012-10-11 Thread Paolo Carlini
Hi, testcase committed, closed as fixed in 4.8.0. Thanks, Paolo. // 2012-10-11 Paolo Carlini PR c++/51878 * g++.dg/cpp0x/decltype45.C: New. Index: g++.dg/cpp0x/decltype45.C === --- g++.dg

[C++ testcase] PR 52744

2012-10-12 Thread Paolo Carlini
Hi, testcase committed, PR closed as fixed in mainline. Tested x86_64-linux. Thanks, Paolo. 2012-10-12 Paolo Carlini PR c++/52744 * g++.dg/cpp0x/pr52744.C: New. Index: g++.dg/cpp0x/pr52744.C

[C++ Patch] PR 24449

2012-10-12 Thread Paolo Carlini
: class Fooa { friend int main(); }; ) using the more accurate PROCESSING_REAL_TEMPLATE_DECL_P() correctly does the trick, AFAICS. Tested x86_64-linux. Thanks, Paolo. // /cp 2012-10-12 Paolo Carlini PR c++/24449 * decl.c (grokfndecl): When checking

Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure

2012-10-12 Thread Paolo Carlini
On 10/12/2012 04:20 PM, Pavel Chupin wrote: Please see attached patch (applicable after revert). I've moved libgcc libstdc++ common configure thread header chunk into separate gthr.m4. Could you please try it on AIX? Is it OK for trunk? Looks Ok. If David can test is successfully on AIX I can a

[C++ Patch] PR 17805

2012-10-13 Thread Paolo Carlini
eally handling the single argument case, thus I also extended a bit the testcase. Tested x86_64-linux. (Finally) Ok? Thanks, Paolo. /// /cp 2012-10-14 Alexandre Oliva Paolo Carlini PR c++/17805 * call.c (build_new_op): Filter out ope

[C++ testcase] PR 52643

2012-10-14 Thread Paolo Carlini
Hi, testcase added, issue closed as fixed. Tested x86_64-linux. Thanks, Paolo. 2012-10-14 Paolo Carlini PR c++/52643 * g++.dg/opt/pr52643.C: New. Index: g++.dg/opt/pr52643.C === --- g

[C++ testcase] PR 53581

2012-10-14 Thread Paolo Carlini
Hi, testcase added, issue closed as fixed. Tested x86_64-linux. Thanks, Paolo. / 2012-10-14 Paolo Carlini PR c++/53581 * g++.dg/template/crash113.C: New. Index: g++.dg/template/crash113.C

[C++ Patch] PR 50080

2012-10-15 Thread Paolo Carlini
Hi, thus, if I understand correctly the resolution of Core/468 [CD1], we can simplify a bit the parser and just accept these 'template' outside templates. Tested x86_64-linux. Thanks, Paolo. /// /cp 2012-10-15 Paolo Carlini PR c++/50080

Re: [C++ Patch] PR 50080

2012-10-15 Thread Paolo Carlini
On 10/15/2012 07:30 PM, Jason Merrill wrote: Actually, let's keep the diagnostic when compiling with -pedantic in 98 mode. ... too late! ;) So I prepared the below, I'm finishing testing it. Thanks, Paolo. // /cp 2012-10-15 Paolo Carlini PR c++/50

[C++ Patch] PR 54501

2012-10-17 Thread Paolo Carlini
idered various solutions, I'm proposing to break the endless loop in reshape_init_array, where we have information about the type of the zero-size array and we can easily provide an accurate error message. Tested x86_64-linux. Thanks, Paolo. // /cp 2012-10-17 Pa

Re: [C++ Patch] PR 54501

2012-10-17 Thread Paolo Carlini
... oh well, I just realized that zero-size VECTORs don't make much sense and are early rejected, thus I can improve my earlier patch. Now I'm happier: essentially I'm only *moving* code around ;) Thanks, Paolo. // /cp 2012-10-17 Paolo Carlini

Re: [C++ Patch] PR 54501

2012-10-18 Thread Paolo Carlini
Hi, On 10/18/2012 03:17 AM, Jason Merrill wrote: Hmm, I thought I fixed a very similar bug recently. I'm concerned that this change will cause problems with brace-elision situations. But then again, can we have a zero-length array followed by anything else? If I understand correctly your hes

[C++ testcase] PR 29633

2012-10-18 Thread Paolo Carlini
Hi, testcase added, PR closed as fixed in mainline. Thanks, Paolo. / 2012-10-18 Paolo Carlini PR c++/29633 * g++.dg/template/pr29633.C: New. Index: g++.dg/template/pr29633.C === --- g++.dg

Re: [C++ Patch] PR 54501

2012-10-18 Thread Paolo Carlini
On 10/18/2012 06:02 PM, Jason Merrill wrote: On 10/18/2012 01:15 AM, Paolo Carlini wrote: If I understand correctly your hesitations, I don't think there are exceptions to the general rule that if the size of the array is zero there can be no initializers. I'm thinking of a testcase

Re: [C++ Patch] PR 54501

2012-10-18 Thread Paolo Carlini
Hi again, On 10/18/2012 06:02 PM, Jason Merrill wrote: On 10/18/2012 01:15 AM, Paolo Carlini wrote: If I understand correctly your hesitations, I don't think there are exceptions to the general rule that if the size of the array is zero there can be no initializers. I'm thi

Re: [PATCH] A steadier steady_clock

2012-10-21 Thread Paolo Carlini
On 10/21/2012 04:00 PM, Sam Varshavchik wrote: Based on a casual browsing of clock_gettime(3), CLOCK_MONOTONIC_RAW seems to be a better fit for std::chrono::steady_clock's requirements as given in 20.11.7.2, with recent Linux kernels, Something like this: Please always CC library patches to l

[C++ Patch] PR 54922

2012-10-22 Thread Paolo Carlini
rrect diagnostics in all cases (eg, together with multiple members initialization diagnostics too). I figured out the below. Tested x86_64-linux, as usual. Thanks, Paolo. /cp 2012-10-22 Paolo Carlini PR c++/54922 * semantics.c (cx_check_missing_mem_

[C++ Patch PING] PR 53761

2012-10-23 Thread Paolo Carlini
Hi, I'm pinging this patchlet: http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01013.html For sure not an high priority issue, neither I can say to fully understand whether in C++ we can and should have the exact same semantics of the __transparent_union__ attribute in C, but I think that i

[v3] libstdc++/55047

2012-10-24 Thread Paolo Carlini
Hi tested x86_64-linux multilib, committed to mainline. A similar fix will go in 4_7-branch too. Thanks, Paolo. 2012-10-24 Haakan Younes Paolo Carlini PR libstdc++/55047 * include/bits/random.h (exponential_distribution<>::op

[C++ Patch] PR 34892

2012-10-24 Thread Paolo Carlini
testcases, and I'm actually pretty happy with that, because we produce much less verbose diagnostic in both cases (1 error message less / 2 respectively). Tested x86_64-linux. Thanks, Paolo. // /cp 2012-10-24 Paolo Carlini PR c++/34892 *

Re: [C++ Patch] PR 34892

2012-10-24 Thread Paolo Carlini
Hi, On 10/24/2012 07:30 PM, Jason Merrill wrote: On 10/24/2012 01:20 PM, Paolo Carlini wrote: + if (parm == error_mark_node + || TREE_PURPOSE (parm) == error_mark_node) It seems odd to bail out early if the default argument is bad even if we aren't trying to use it. Doesn

Re: [C++ Patch] PR 53761

2012-10-24 Thread Paolo Carlini
Hi, On 10/24/2012 06:57 PM, Jason Merrill wrote: On 10/10/2012 11:13 AM, Paolo Carlini wrote: - error ("type transparent class %qT does not have any fields", t); + if (TREE_CODE (t) == UNION_TYPE) +error ("type transparent union %qT does not have

Re: [C++ Patch] PR 53761

2012-10-24 Thread Paolo Carlini
Hi, On 10/24/2012 09:55 PM, Jason Merrill wrote: On 10/24/2012 03:48 PM, Paolo Carlini wrote: + error ("type transparent %q#T cannot be made transparent because " + "a field has neither pointer nor integer type", t); I'd say "%q#T cannot be mad

Re: [C++ Patch] PR 34892

2012-10-24 Thread Paolo Carlini
On 10/24/2012 09:53 PM, Jason Merrill wrote: On 10/24/2012 02:11 PM, Paolo Carlini wrote: The problem is that the first time we go through the loop, when parm_idx == 0 and TREE_PURPOSE is error_mark_node, the condition: if (template_parameter_pack_p (TREE_VALUE (parm)) &&am

[v3] Another try at LWG 2141

2012-10-24 Thread Paolo Carlini
irements/sfinae_friendly_2.cc === --- testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc (revision 192762) +++ testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc (working copy) @@ -24,12 +24,11 @@ tem

Re: [C++ Patch] PR 53761

2012-10-24 Thread Paolo Carlini
.. Oh well, and the details of this are even subtler, because, assuming we want the exact same behavior of the C front-end, we are going to accept: typedef union { int* f; int y; } __attribute__(( __transparent_union__ )) example_t; and reject: typedef union { int f; int* y; } __attrib

Re: [C++ Patch] PR 34892

2012-10-24 Thread Paolo Carlini
ngle regression, at the end of pr39060.C, because NULL_TREE implies that we don't do anymore the diagnostics about default argument part of duplicate_decls (which ICC also gives). Besides that, for 34892 we give like 6 different error messages ;) //////// /cp 2012-10-24 Pa

Re: [C++ Patch] PR 34892

2012-10-24 Thread Paolo Carlini
Hi, On 10/25/2012 03:53 AM, Jason Merrill wrote: We can stop it even sooner: /* If the next token is an ellipsis, and we don't already have it marked as a parameter pack, then we have a parameter pack (that has no declarator). */ if (!*is_parameter_pack && cp_lexer_next_to

[C++ Patch] PR 54984

2012-10-25 Thread Paolo Carlini
can't be improved, I'm not very familiar with dg-final. Also, in case we agree that the fix can be such simple, we could maybe consider 4_7-branch too... Thanks! Paolo. //// /cp 2012-10-26 Paolo Carlini PR c++/54984 * init.c (build_new): Don&

Re: [C++ Patch] PR 54984

2012-10-26 Thread Paolo Carlini
Hi, On 10/26/2012 02:44 PM, Jason Merrill wrote: On 10/25/2012 09:15 PM, Paolo Carlini wrote: I'm not sure the testcase can't be improved, I'm not very familiar with dg-final. You could do an execution test using a user-defined operator new which initializes the memory to

Re: Add C++11 const char* overloads for exception classes.

2012-10-26 Thread Paolo Carlini
On 10/26/2012 04:11 PM, Ed Smith-Rowland wrote: Committed. I can't find the message actually approving the patch. And personally I'm a bit nervous about it. Paolo.

Re: Add C++11 const char* overloads for exception classes.

2012-10-26 Thread Paolo Carlini
On 10/26/2012 04:36 PM, Ed Smith-Rowland wrote: On 10/26/2012 10:26 AM, Paolo Carlini wrote: On 10/26/2012 04:11 PM, Ed Smith-Rowland wrote: Committed. I can't find the message actually approving the patch. And personally I'm a bit nervous about it. Paolo. Sorry, i though it

[C++ Patch] PR 54526 (again)

2012-10-28 Thread Paolo Carlini
below. Tested x86_64-linux. Thanks, Paolo. /libcpp 2012-10-28 Paolo Carlini PR c++/54526 (again) * lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2. /gcc/cp 2012-10-28 Paolo Carlini PR c++/54526 (again) * parser.c

Re: real_zerop for vectors

2012-10-28 Thread Paolo Carlini
On 10/28/2012 04:14 PM, Marc Glisse wrote: Hello, this patch lets some predicates on floating point constants answer true for vectors, so optimizations are applied. Great. I wonder how are we doing lately in terms of function pointer inlining?! If the current optimizers can already able to s

Re: real_zerop for vectors

2012-10-28 Thread Paolo Carlini
On 10/28/2012 04:46 PM, Paolo Carlini wrote: On 10/28/2012 04:14 PM, Marc Glisse wrote: Hello, this patch lets some predicates on floating point constants answer true for vectors, so optimizations are applied. Great. I wonder how are we doing lately in terms of function pointer inlining

Re: real_zerop for vectors

2012-10-28 Thread Paolo Carlini
Hi, On 10/28/2012 05:51 PM, Marc Glisse wrote: On Sun, 28 Oct 2012, Marc Glisse wrote: [there are 4 real_*p that only differ by 1 character] It is true that we could have a single function in tree.c: bool real_intcstp (const_tree, int); The helper function could even take a REAL_VALUE_TYPE

Re: real_zerop for vectors

2012-10-28 Thread Paolo Carlini
On 10/28/2012 06:06 PM, Marc Glisse wrote: On Sun, 28 Oct 2012, Paolo Carlini wrote: I was writing something like the below. I would move the one-liners (real_zerop, etc) to tree.h, but that looks good, yes. Ah great. But please, don't wait on me, I'm in the middle of too many ot

Re: [PING^2] [C++ PATCH] Add overflow checking to __cxa_vec_new[23]

2012-10-30 Thread Paolo Carlini
Hi, Florian Weimer ha scritto: >Ping? > >Patch is at: http://gcc.gnu.org/ml/gcc-patches/2012-08/msg01416.html Sorry, I don't know the code well enough to review your patch, but since I'm in CC, I still don't understand why, instead of adding a full libstdc++ testcase you are extending a C++ t

[C++ Patch] PR 54583

2012-10-30 Thread Paolo Carlini
2012-10-30 Paolo Carlini PR c++/54583 * tree.c (build_cplus_array_type): Set TREE_NO_WARNING on the TYPE_SIZE of VLAs. /testsuite 2012-10-30 Paolo Carlini PR c++/54583 * g++.dg/ext/vla13.C: New. Index: testsuite/g++.dg/e

Re: [Patch] Remove _GLIBCXX_HAVE_BROKEN_VSWPRINTF from (was Re: GCC 4.8.0 Status Report (2012-10-29), Stage 1 to end soon)

2012-10-31 Thread Paolo Carlini
Applied. Thanks, Paolo.

Re: [C++ Patch] PR 54583

2012-10-31 Thread Paolo Carlini
Hi, On 10/31/2012 02:50 PM, Jason Merrill wrote: On 10/30/2012 07:44 PM, Paolo Carlini wrote: straightforward fix. The below, which regtests fine, simply acts on any MULT_EXPR as TYPE_SIZE, which I think should be fine, but, in case the idea is basically Ok, we could also consider the more

[C++ Patch] PR 58535

2013-10-02 Thread Paolo Carlini
e that I'm adding a check in finish_fully_implicit_template. Tested x86_64-linux. Thanks, Paolo. ///////// /cp 2013-10-02 Paolo Carlini PR c++/58565 * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR. /testsuite 2013-10-02 Paolo Carlini

Re: [C++ Patch] PR 58535

2013-10-02 Thread Paolo Carlini
... oops attached the patch which I just committed. Sorry. Right attachments below. Thanks, Paolo. // /cp 2013-10-02 Paolo Carlini PR c++/58535 * parser.c (cp_parser_function_specifier_opt): Upon error about virtual templates don'

[C++ Patch] PR 58584

2013-10-02 Thread Paolo Carlini
, etc. Tested x86_64-linux. Thanks, Paolo. // /cp 2013-10-04 Paolo Carlini PR c++/58584 * decl2.c (cplus_decl_attributes): Correctly handle error_mark_node as attributes argument. * parser.c (cp_parser_std_attribute_spec): When alignas_expr is

[C++ Patch] PR 58503

2013-10-03 Thread Paolo Carlini
k fine (I also checked that with -fpermissive an eventual instantiation produces hard errors, as it should) Tested x86_64-linux. Thanks, Paolo. /cp 2013-10-03 Paolo Carlini PR c++/58503 * parser.c (cp_parser_perform_range_for_lookup): If e

Re: [C++ Patch] PR 58584

2013-10-03 Thread Paolo Carlini
Hi, On 10/03/2013 04:02 PM, Jason Merrill wrote: On 10/02/2013 09:02 PM, Paolo Carlini wrote: - save_template_attributes (&attributes, decl); + if (attributes != error_mark_node) +save_template_attributes (&attributes, decl); I'd rather make save_template_attr

Re: [Patch] Fix wrong backup variable initialization in regex

2013-10-03 Thread Paolo Carlini
On 10/03/2013 07:33 PM, Tim Shen wrote: Tested under -m32, -m64, however didn't do a bootstrap. Is that OK? Seems trivial enough, Ok. Thanks, Paolo PS: I suppose isn't easy to prepare a testcase which would exercise those lines?

Re: [Patch] Fix wrong backup variable initialization in regex

2013-10-03 Thread Paolo Carlini
Hi, On 10/03/2013 10:55 PM, Tim Shen wrote: On Thu, Oct 3, 2013 at 4:39 PM, Paolo Carlini wrote: Seems trivial enough, Ok. Committed. PS: I suppose isn't easy to prepare a testcase which would exercise those lines? Telling the truth, this bug *is* revealed by rerunning testcases wit

Re: [Patch] Fix wrong backup variable initialization in regex

2013-10-03 Thread Paolo Carlini
Forgot... But in >principle yes, since we deliver two, and the users have a way to choose > >which one they want (X) we should add to the testsuite 2 copies of each > >test which doesn't use br and test both executors. In practice, of course, we could also avoid the 2 physical copies. For examp

Re: [Patch] Fix wrong backup variable initialization in regex

2013-10-03 Thread Paolo Carlini
Hi, Tim Shen ha scritto: >Yes I think we should keep secret, because the standard doesn't >specify it. They only way to publish the switch to user is making a >library extension(is that true?), but there's no obvious benefit to do >that(is that true? I shall be humble). Well, the standard does

Re: [C++ Patch] PR 58503

2013-10-03 Thread Paolo Carlini
On 10/03/2013 03:27 PM, Jason Merrill wrote: On 10/03/2013 05:52 AM, Paolo Carlini wrote: + else if (!TREE_TYPE (*begin) || !TREE_TYPE (*end)) This should use type_dependent_expression_p. And there should be a positive test for a dependent range that exercises this code. I see what

Re: [C++ Patch] PR 58503

2013-10-03 Thread Paolo Carlini
have of a positive test in this context. Thus the below, lightly tested so far but the tests both pass and the patch itself isn't so different, besides type_dependent_expression_p. Thanks! Paolo. /cp 2013-10-04 Paolo Carlini PR c++/58503

[C++ Patch] PR 58560

2013-10-04 Thread Paolo Carlini
Hi, this error recovery ICE (a low priority regression) can be easily avoided by checking the TREE_TYPE of exp too. Tested x86_64-linux. Thanks, Paolo. /// /cp 2013-10-04 Paolo Carlini PR c++/58560 * typeck2.c (build_functional_cast): Use

Re: [C++ Patch] PR 58448

2013-10-04 Thread Paolo Carlini
... and this is a more straightforward approach. Also tested x86_64-linux. Thanks! Paolo. / /cp 2013-10-04 Paolo Carlini PR c++/58448 * pt.c (tsubst): Use error_operand_p on parameter t. /testsuite 2013-10-04 Paolo Carlini PR c++/58448

Re: [Patch] Internal functions for testsuite in regex

2013-10-04 Thread Paolo Carlini
Hi, On 10/04/2013 04:13 PM, Tim Shen wrote: This is based on disscusions here(http://gcc.gnu.org/ml/libstdc++/2013-10/msg00034.html) And it successfully find a bug in regex_executor.tcc :) Booted and tested under -m32, -m64 and debug before the change in regex_executor.tcc; -m32 and -m64 only

Re: [Patch] Internal functions for testsuite in regex

2013-10-04 Thread Paolo Carlini
On 10/04/2013 06:04 PM, Paolo Carlini wrote: In particular, the new *_testsuite functions, isn't immediately clear in what they differ from the non-_testsuite variants. In any case we should figure out a better name, maybe even *_internal, if we can't find anything more accurate, but

Re: [Patch] Internal functions for testsuite in regex

2013-10-04 Thread Paolo Carlini
.. a final one: if you don't like all those *_debug functions around, both in rehex.h and regex.tcc, you could move all of them to a new header matching the new naming scheme, like regex_debug.h. For the time being I would recommend putting it in bits/, installing it, including it from , exactl

Re: [c++-concepts] constrained friends redux

2013-10-04 Thread Paolo Carlini
Hi Andrew, On 10/04/2013 07:36 PM, Andrew Sutton wrote: + if (!check_template_constraints (tmpl, args)) +{ + location_t loc = DECL_SOURCE_LOCATION (function); + error ("%qD is not a viable candidate", function); + diagnose_constraints (

Re: [Patch] Internal functions for testsuite in regex

2013-10-05 Thread Paolo Carlini
On 10/05/2013 03:58 AM, Tim Shen wrote: On Fri, Oct 4, 2013 at 12:30 PM, Paolo Carlini wrote: A completely different option, which I also like a lot in fact, would be putting the new *_testsuite functions inside the already existing testsuite/util/testsuite/regex.h. There you would use

Re: [Patch] Internal functions for testsuite in regex

2013-10-05 Thread Paolo Carlini
Hi, Tim Shen ha scritto: >Some are changed to size_t, some to long; some harmless ones are left. > >I'll do a bootstrap & full test before committing. Patch looks great to me. If you don't get more comments over the next day or so, please go ahead. Thanks! Paolo

[C++ Patch] PR 56060

2013-10-05 Thread Paolo Carlini
look inside the expression via PACK_EXPANSION_PATTERN: in the testcase, for "bar ..." as expression the _PATTERN is a TEMPLATE_ID_EXPR which then is normally handled. Tested x86_64-linux. Thanks, Paolo. /cp 2013-10-06 Paolo Carlini PR c++/56060

Re: [Patch] Fix COMPILE error in regex and remove default parameter in function definition

2013-10-06 Thread Paolo Carlini
On 10/06/2013 07:46 AM, Tim Shen wrote: Stupid errors hidden in some large commit. Ok, thanks. Paolo.

Re: [C++ Patch] PR 56060

2013-10-06 Thread Paolo Carlini
Hi, Jason Merrill ha scritto: >For EXPR_PACK_EXPANSION we can just return true; a pack expansion is >always dependent, on the number of arguments if nothing else. Thanks. I suspected that ;) Then I'm going to test the corresponding very simple patch and commit it. Thanks again! Paolo

[v3] libstdc++/58625

2013-10-06 Thread Paolo Carlini
Hi, tested x86_64-linux, committed to mainline. Paolo. /// 2013-10-06 Oleg Endo Paolo Carlini PR libstdc++/58625 * include/c_global/cmath (signbit): Use __builtin_signbitf and __builtin_signbitl. Index: include/c_global/cmath

[C++ Patch] PR 58126

2013-10-06 Thread Paolo Carlini
"class 'B'" and "base class 'A'" for these structs too? // /cp 2013-10-06 Paolo Carlini PR c++/58126 * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT and CLASSTYPE_REF_FIELDS_NEED_INIT fro

Re: [Patch] Optimize _BFSExecutor in regex

2013-10-06 Thread Paolo Carlini
On 10/07/2013 12:43 AM, Tim Shen wrote: Here's a simple piece of code https://gist.github.com/innocentim/6849759 the reveals _BFSExecutor's inefficiency. ... which we want in testsuite/performance/28_regex! Thanks! Paolo.

Re: [SKETCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.

2013-10-07 Thread Paolo Carlini
Hi, On 10/07/2013 11:14 AM, Adam Butcher wrote: + if (!cp_disable_auto_as_implicit_function_template_parm && + current_binding_level->kind == sk_function_parms) Stylistic nit: && should be on the next line. Thanks! Paolo.

[C++ Patch] PR 58568

2013-10-07 Thread Paolo Carlini
5.C) I don't get the impression that explicitly talking about derivation ever adds much, if anything. Tested x86_64-linux. Thanks, Paolo. / /cp 2013-10-08 Paolo Carlini PR c++/58568 * lambda.c (begin_lambda_type): Check return value of xref_tag

[C++ Patch] PR 58633

2013-10-08 Thread Paolo Carlini
committing the tentative parse when the flag is true. Tested x86_64-linux. Thanks, Paolo. /// /cp 2013-10-08 Paolo Carlini PR c++/58633 * parser.c (cp_parser_postfix_dot_deref_expression, cp_parser_pseudo_destructor_name): Add bool parameter

Re: [C++ Patch] PR 58448

2013-10-08 Thread Paolo Carlini
On 10/04/2013 02:04 PM, Paolo Carlini wrote: ... and this is a more straightforward approach. Also tested x86_64-linux. I reverted this for now. Was causing problems (c++/58665). Thanks, Paolo.

Re: [C++ Patch] PR 58633

2013-10-08 Thread Paolo Carlini
.. a curiosity: the cp_parser_commit_to_tentative_parse at the end of cp_parser_pseudo_destructor_name, which didn't exist in 4.6.x and we can consider the root of this issue, is also my fault: http://gcc.gnu.org/ml/gcc-patches/2011-05/msg02246.html From a different angle, I'm happy of the

[C++ Patch] PR 58633 (Take 2)

2013-10-09 Thread Paolo Carlini
the parsing of valid postfix-expressions != member access expression. Tested x86_64-linux. Thanks! Paolo. ///// /cp 2013-10-09 Paolo Carlini PR c++/58633 * parser.c (cp_parser_decltype_expr): Restructure parsing of expressio

Re: [C++ Patch] PR 58633

2013-10-09 Thread Paolo Carlini
Hi, On 10/09/2013 03:56 PM, Jason Merrill wrote: On 10/08/2013 07:03 PM, Paolo Carlini wrote: .. a curiosity: the cp_parser_commit_to_tentative_parse at the end of cp_parser_pseudo_destructor_name, which didn't exist in 4.6.x and we can consider the root of this issue, is also my

[C++ Patch] PR 31671

2013-10-10 Thread Paolo Carlini
, Paolo. /cp 2013-10-10 Paolo Carlini PR c++/31671 * pt.c (convert_nontype_argument): Adjust TREE_TYPE (expr) to the cv-qualifiers of TREE_TYPE (probe_type). /testsuite 2013-10-10 Paolo Carlini PR c++/31671 * g++.dg/template

Re: [C++ Patch] PR 31671

2013-10-10 Thread Paolo Carlini
Hi, On 10/10/2013 08:26 PM, Jason Merrill wrote: On 10/10/2013 08:33 AM, Paolo Carlini wrote: + expr_type = TREE_TYPE (expr) = cp_build_qualified_type +(TREE_TYPE (expr), cp_type_quals (TREE_TYPE (probe_type))); Won't that end up being the same as the contents of expr

Re: [C++ Patch] PR 31671

2013-10-11 Thread Paolo Carlini
Hi, On 10/11/2013 05:55 AM, Jason Merrill wrote: On 10/10/2013 03:31 PM, Paolo Carlini wrote: On 10/10/2013 08:26 PM, Jason Merrill wrote: On 10/10/2013 08:33 AM, Paolo Carlini wrote: + expr_type = TREE_TYPE (expr) = cp_build_qualified_type +(TREE_TYPE (expr), cp_type_quals

Re: [C++ Patch] PR 58633

2013-10-11 Thread Paolo Carlini
oo, what should we do in those branches? I'm thinking applying the change to 4_8 too and either not fixing in 4_7 or just reverting the cp_parser_commit_to_tentative_parse change which improved the diagnostic for 47277? Thanks, Paolo. /////// /cp 2013-10-11 Paolo Carli

Re: [C++ Patch] PR 58633

2013-10-11 Thread Paolo Carlini
On 10/11/2013 03:59 PM, Jason Merrill wrote: On 10/11/2013 06:28 AM, Paolo Carlini wrote: The issue is a regression in 4_7/4_8 too, what should we do in those branches? I'm thinking applying the change to 4_8 too and either not fixing in 4_7 or just revertin

[C++ Patch] PR 58466

2013-10-11 Thread Paolo Carlini
bunch of those returned untouched leads to the same error message of 4_7 and no ICE. Not sure at the moment whether something deeper is going on, though. Tested x86_64-linux. Thanks, Paolo. // /cp 2013-10-11 Paolo Carlini PR c++/58466 * s

Re: [C++ Patch] PR 58466

2013-10-11 Thread Paolo Carlini
Hi, On 10/11/2013 07:46 PM, Jason Merrill wrote: How does a TEMPLATE_PARM_INDEX get this far? It should have been detected as dependent before this. Thanks. Interesting. We get there from the convert_nontype_argument call at line 6453 of pt.c (in convert_template_argument) , which is protected

Re: [C++ Patch] PR 58466

2013-10-11 Thread Paolo Carlini
On 10/11/2013 08:29 PM, Paolo Carlini wrote: Are we maybe failing to bump processing_template_decl somewhere while processing the specialization? ... I'm finishing testing this, already past g++.dg/dg.exp... Paolo. Index: cp

Re: [C++ Patch] PR 58466

2013-10-12 Thread Paolo Carlini
On 10/11/2013 09:31 PM, Paolo Carlini wrote: On 10/11/2013 08:29 PM, Paolo Carlini wrote: Are we maybe failing to bump processing_template_decl somewhere while processing the specialization? ... I'm finishing testing this, already past g++.dg/dg.exp... In the meanwhile testing comp

[C++ Patch] PR 58700

2013-10-12 Thread Paolo Carlini
behavior. Tested x86_64-linux. Thanks, Paolo. / /cp 2013-10-14 Paolo Carlini PR c++/58700 * decl.c (grokdeclarator): Don't try to pass declarator->id_loc to build_lang_decl_loc when declarator is null. /testsuite 2013-10-14 Paolo Carlini

[C++ Patch] Tidy a bit cp_parser_lookup_name

2013-10-13 Thread Paolo Carlini
Hi, today I noticed that in cp_parser_lookup_name the code in the object_type != NULL_TREE else can be tidied a bit and a lookup_name_real often avoided. Tested x86_64-linux. Thanks, Paolo. / 2013-10-14 Paolo Carlini * parser.c (cp_parser_lookup_name

Re: [PATCH] tree_code_name wrapper

2013-10-14 Thread Paolo Carlini
Hi On 10/14/2013 05:43 PM, Paulo Matos wrote: * cp/error.c (code_to_string): Use new wrapper get_tree_code_name. * cp/cxx-pretty-print.c (pp_cxx_assignment_operator): Use new wrapper get_tree_code_name. * cp/pt.c (tsubst): Use new wrapper get_tree_code_name. * cp

Re: [Patch] Fix PR58737

2013-10-15 Thread Paolo Carlini
On 10/15/2013 04:56 PM, Tim Shen wrote: This memory leak is because forgetting virtual destructor of the base class _Executor. Of course. Thanks, Paolo.

[C++ Patch] PR 58707

2013-10-15 Thread Paolo Carlini
l case c++11 vs c++98. Neither wrap only the cp_parser_expression call. /// /cp 2013-10-15 Paolo Carlini PR c++/58707 * parser.c (cp_parser_postfix_open_square_expression): Set parser->greater_than_is_operator_p for the argument. /testsuite 2

[C++ Patch] PR 58724

2013-10-16 Thread Paolo Carlini
. Thanks, Paolo. /// 2013-10-16 Paolo Carlini PR c++/58724 * doc/extend.texi [visibility ("visibility_type")]: Add example about visibility attribute on namespace declaration. /cp 2013-10-16 Paolo Carlini PR c++/58724 * nam

Re: [PATCH] tree_code_name wrapper

2013-10-16 Thread Paolo Carlini
Hi, bootstrap is currently broken, I'm going to test and commit the below if everything goes well. Thanks, Paolo. /// Index: pt.c === --- pt.c(revision 203698) +++ pt.c(working copy) @@ -12102,7 +1

Re: [Patch] Fix undefined behaviors in regex

2013-10-16 Thread Paolo Carlini
On 10/16/2013 11:48 PM, Tim Shen wrote: It's detected by `clang++ -g -std=c++11 -fsanitize=undefined` but not detected by g++ with flags `g++ -g -std=c++11 -fsanitize=undefined -lpthread`. Am I on the right way? -m32 and -m64 tested :) Thank you! Paolo.

Re: [Patch] Fix undefined behaviors in regex

2013-10-16 Thread Paolo Carlini
On 10/17/2013 12:29 AM, Tim Shen wrote: On Wed, Oct 16, 2013 at 6:13 PM, Paolo Carlini wrote: Thank you! Committed. By the way, please feel free to prepare a reduced testcase for the -fsanitize people (Marek, Jakub?) Thanks, Paolo.

Re: [Patch] Fix undefined behaviors in regex

2013-10-16 Thread Paolo Carlini
On 10/17/2013 12:39 AM, Tim Shen wrote: On Wed, Oct 16, 2013 at 6:33 PM, Paolo Carlini wrote: By the way, please feel free to prepare a reduced testcase for the -fsanitize people (Marek, Jakub?) Here it is. And we should get undefined behaviors before this commit(r203732). To be honest, I

Re: [Patch] Fix undefined behaviors in regex

2013-10-17 Thread Paolo Carlini
On 10/17/2013 09:17 AM, Jakub Jelinek wrote: Though, in the above case, the question is why people ignore warnings from the compiler and need to have special runtime instrumentation to remind them instead. I'm not objecting to that sanitization, only find it weird. I had the same thought. Pao

Re: PR libstdc++/58729 - tr2::dynamic_bitset::resize fails

2013-10-17 Thread Paolo Carlini
Hi, On 10/17/2013 09:04 AM, Ed Smith-Rowland wrote: This patch bootstraps and tests clean on x86-64-linux. Truthfully, dynamic_bitset needs some more love wrt C++11 and a testsuite. It got put in before it was baked really. That will be later. Patch is Ok with me. Before committing you may w

[C++ Patch] PR 58596

2013-10-17 Thread Paolo Carlini
4-linux. Thanks! Paolo. //// /cp 2013-10-17 Paolo Carlini PR c++/58596 * lambda.c (lambda_expr_this_capture): Handle NSDMIs in the cp_unevaluated_operand case. /testsuite 2013-10-17 Paolo Carlini PR c++/58596 * g++.dg/cpp0x/lambda/lambda-

<    1   2   3   4   5   6   7   8   9   10   >