Re: [PATCH] PR c++/51145 - Alias template in elaborated-type-specifier

2011-11-22 Thread Dodji Seketeli
Jason Merrill writes: > On 11/21/2011 11:41 AM, Dodji Seketeli wrote: >> -template class Ptr;//{ dg-error "explicit instantiation|non-class >> templ|does not decl|anything" } >> +template class Ptr;//{ dg-error "alias >> templ|specialization|Ptr|af

[PATCH] PR c++/51289 - ICE with alias template for bound template

2011-11-28 Thread Dodji Seketeli
ew file mode 100644 index 000..a7b2d37 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C @@ -0,0 +1,13 @@ +// Origin PR c++/51289 +// { dg-options "-std=c++11" } + +template class b> +struct foo { + template + using type = b; + template + b funca() {} + + template + type funcb() {} +}; -- 1.7.6.4 -- Dodji

Re: [PATCH] PR c++/51289 - ICE with alias template for bound template

2011-11-29 Thread Dodji Seketeli
Jason Merrill writes: > On 11/28/2011 11:54 AM, Dodji Seketeli wrote: >> @@ -3028,10 +3028,12 @@ find_parameter_packs_r (tree*tp, int *walk_subtrees, >> void* data) >> >> case BOUND_TEMPLATE_TEMPLATE_PARM: >> /* Check the template itself. */ &

Re: [PATCH] PR c++/51289 - ICE with alias template for bound template

2011-11-30 Thread Dodji Seketeli
Jason Merrill writes: > On 11/29/2011 10:41 AM, Dodji Seketeli wrote: >> + cp_walk_tree (&DECL_ORIGINAL_TYPE (TYPE_NAME (t)), >> +&find_parameter_packs_r, >> +ppd, ppd->visited); > > I still don't think we want to walk

Re: [PATCH] PR c++/51289 - ICE with alias template for bound template

2011-11-30 Thread Dodji Seketeli
Jason Merrill writes: > I guess let's check DECL_ORIGINAL_TYPE instead of TREE_TYPE for alias > templates. Like the below that I am currently bootstrapping? From: Dodji Seketeli Date: Sat, 26 Nov 2011 11:50:43 +0100 Subject: [PATCH] PR c++/51289 - ICE with alias template for bou

Re: [PATCH] PR c++/51289 - ICE with alias template for bound template

2011-12-02 Thread Dodji Seketeli
Dodji Seketeli writes: > Jason Merrill writes: > >> I guess let's check DECL_ORIGINAL_TYPE instead of TREE_TYPE for alias >> templates. > > Like the below that I am currently bootstrapping? Finally this is what passed bootstrap and testing on x86_64-unknown-l

[PATCH] PRs c++/51239, c++/51180 - Better support for unbound alias template specialization

2011-12-02 Thread Dodji Seketeli
/cpp0x/alias-decl-19.C @@ -0,0 +1,19 @@ +// Origin PR c++/51180 +// { dg-options "-std=c++11" } + +template +struct t2 // { dg-error "provided for" } +{ +}; + +template class M> +struct m +{ +template +using inner = M; // { dg-error "wrong number of template arg" } +}; + +m sta1; // <-- this one is valid +m::inner sta2; // <-- and this one as well +m::inner sta3;// { dg-error "invalid" } +m::inner sta4;// { dg-error "invalid" } -- 1.7.6.4 -- Dodji

[PATCH] [RFC] PR debug/49951 - jumpy stepping at end of scope in C++

2011-12-03 Thread Dodji Seketeli
gcov-2.C @@ -20,9 +20,9 @@ private: void foo() { - C c; /* count(2) */ + C c; /* count(1) */ c.seti (1); /* count(1) */ -} +} /* count(1) <- destructor of c runs here. */ int main() { -- 1.7.6.4 -- Dodji

Re: [C++ Patch] PR 51326

2011-12-03 Thread Dodji Seketeli
PE_P (fromtype) || !MAYBE_CLASS_TYPE_P (totype) || !DERIVED_FROM_P (totype, fromtype)); I don't have a test case for that though. -- Dodji

[PATCH, libcpp] Add 'inline' to prototype of tokens_buff_remove_last_token

2011-12-03 Thread Dodji Seketeli
pp/macro.c | 16 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 1df9e08..f47bf03 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,9 @@ +2011-12-03 Dodji Seketeli + + * macro.c (tokens_buff_remove_

Re: [C++ Patch] PR 51326

2011-12-03 Thread Dodji Seketeli
Jason Merrill a écrit: > On 12/03/2011 04:25 PM, Dodji Seketeli wrote: >> This might be a theoretical nit, but it looks like if expr is >> error_mark_node, we'd crash as well, because of the line below that comes >> right after the comment above: >> >&

Re: [PATCH] PRs c++/51239, c++/51180 - Better support for unbound alias template specialization

2011-12-05 Thread Dodji Seketeli
d change the name; it took me a little while to realize that "nb" is > short for "number". Okay. I'll look into this. Thanks. -- Dodji

[PATCH] PR c++/51427 - Better diagnostic when union/struct tags conflict

2011-12-06 Thread Dodji Seketeli
tstrapped and tested on x86_64-unknown-linux-gnu against trunk, approved in the audit trail of the PR and applied to trunk. Thanks. From: Dodji Seketeli Date: Mon, 5 Dec 2011 23:24:23 +0100 Subject: [PATCH] PR c++/51427 - Better diagnostic when union/struct tags conflicts gcc/cp/ PR c++/5

Re: [PATCH] PR c++/51427 - Better diagnostic when union/struct tags conflict

2011-12-06 Thread Dodji Seketeli
CL_SOURCE_LOCATION (TYPE_NAME (type)), >> +             "%q#T was previously declared here", type); >> +    } >>  } > > Hmm, I am wondering if we shouldn't remove the permerror and make it > an unconditional error. Just curious, do we have a rule about when to turn permerrors into unconditional errors and thus stop providing legacy code bases with a smooth migration path? -- Dodji

[Dodji Seketeli] Re: [PATCH] PR c++/51289 - ICE with alias template for bound template

2011-12-07 Thread Dodji Seketeli
Friendly pinging this patch. --- Begin Message --- Dodji Seketeli writes: > Jason Merrill writes: > >> I guess let's check DECL_ORIGINAL_TYPE instead of TREE_TYPE for alias >> templates. > > Like the below that I am currently bootstrapping? Finally this is what pa

[PATCH 0/2] Better represent unbound template specializations (PR c++/51239, c++/51180)

2011-12-09 Thread Dodji Seketeli
, and the second easily uses that to represent unbound specializations of alias templates to actually fix PRs c++/51239 and PRs c++/51180. Each patch has been bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. -- Dodji

[PATCH 1/2] Use TEMPLATE_ID_TYPE in lieu of BOUND_TEMPLATE_TEMPLATE_PARM

2011-12-09 Thread Dodji Seketeli
break; -case BOUND_TEMPLATE_TEMPLATE_PARM: - emit_diagnostic (diag_kind, input_location, 0, - "invalid use of template template parameter %qT", - TYPE_NAME (type)); +case TEMPLATE_ID_TYPE: + if (BOUND_TEMPLATE_TEMPLATE_PARM_P (type)) + emit_diagnostic (diag_kind, input_location, 0, +"invalid use of template template parameter %qT", +TYPE_NAME (type)); + else + emit_diagnostic (diag_kind, input_location, 0, +"invalid use of template-id %qT", +TYPE_NAME (type)); break; case TYPENAME_TYPE: -- 1.7.6.4 -- Dodji

[PATCH 2/2] PR c++/51239, c++/51180 - Better support for unbound alias templates

2011-12-09 Thread Dodji Seketeli
M> +struct m +{ +template +using inner = M; // { dg-error "wrong number of template arg" } +}; + +m sta1; // <-- this one is valid +m::inner sta2; // <-- and this one as well +m::inner sta3;// { dg-error "invalid" } +m::inner sta4;// { dg-error "invalid" } -- 1.7.6.4 -- Dodji

[PATCH] PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11

2011-12-13 Thread Dodji Seketeli
int i; +A<&B::i> a; // { dg-error "could not convert template argument" } +}; -- 1.7.6.4 -- Dodji

Re: [PATCH] PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11

2011-12-13 Thread Dodji Seketeli
{ +int i; +A<&B::i> a; // { dg-error "could not convert template argument" } +}; -- 1.7.6.4 -- Dodji

Re: [PATCH] PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11

2011-12-13 Thread Dodji Seketeli
{ dg-error "could not convert template argument" } +}; -- 1.7.6.4 -- Dodji

[PATCH] PR c++/51477 - ICE with invalid NSDMI

2011-12-13 Thread Dodji Seketeli
// { dg-error "invalid|forward" } +}; -- 1.7.6.4 -- Dodji

[PATCH] PR c++/51475 - ICE with invalid initializer-list

2011-12-14 Thread Dodji Seketeli
}; + +struct B +{ +const std::initializer_list& x; +}; + +B b = {{1}}; // { dg-error "invalid conversion|cannot convert" } -- 1.7.6.4 -- Dodji

Re: [PATCH] PR c++/51475 - ICE with invalid initializer-list

2011-12-14 Thread Dodji Seketeli
type)) - && (TYPE_UNSIGNED (t1->u.next->type) - || (TREE_CODE (t1->u.next->type) + && (TYPE_UNSIGNED (next_conv->type) + || (TREE_CODE (next_conv->type) == ENUMERAL_TYPE))) { - tree type = t1->u.next->type; + tree type = next_conv->type; tree type1, type2; struct z_candidate *w, *l; if (comp > 0) -- 1.7.6.4 -- Dodji

Re: [PATCH] PR c++/51475 - ICE with invalid initializer-list

2011-12-15 Thread Dodji Seketeli
Jason Merrill writes: > On 12/14/2011 03:41 PM, Dodji Seketeli wrote: >> @@ -8041,6 +8041,7 @@ joust (struct z_candidate *cand1, struct z_candidate >> *cand2, bool warn) >> { >> conversion *t1 = cand1->convs[i + off1]; >> co

[PATCH] PR c++/51473 - ICE with invalid auto

2011-12-15 Thread Dodji Seketeli
nly be specified|friend" } +}; + +auto int; // { dg-error "multiple types|can only be specified for variables" } -- 1.7.6.4 -- Dodji

[PATCH] PR c++/51462 - ICE in cx_check_missing_mem_inits

2011-12-16 Thread Dodji Seketeli
+ +struct A +{ + int i = 0; +}; + +struct B +{ + A a; +constexpr B() : a(0) {} // { dg-error "no matching function" } +}; -- 1.7.6.4 -- Dodji

Re: [PATCH] PR c++/51462 - ICE in cx_check_missing_mem_inits

2011-12-16 Thread Dodji Seketeli
Jason Merrill writes: > On 12/16/2011 11:40 AM, Dodji Seketeli wrote: >>/* It's OK to skip a member with a trivial constexpr ctor. >> A constexpr ctor that isn't trivial should have been >> added in by now. */ &g

Re: [PATCH] PR c++/51462 - ICE in cx_check_missing_mem_inits

2011-12-16 Thread Dodji Seketeli
Gabriel Dos Reis writes: > On Fri, Dec 16, 2011 at 10:40 AM, Dodji Seketeli wrote: >> Hello, > >> So I am thinking that maybe letting expand_default_init represent the >> invalid initialization would prevent us from getting into this case. >>

Re: [PATCH] [RFC] PR debug/49951 - jumpy stepping at end of scope in C++

2011-12-19 Thread Dodji Seketeli
/* count(1) */ c.seti (1); /* count(1) */ } -- 1.7.6.4 -- Dodji

Re: [PATCH] [RFC] PR debug/49951 - jumpy stepping at end of scope in C++

2011-12-19 Thread Dodji Seketeli
Jakub Jelinek writes: > On Mon, Dec 19, 2011 at 11:54:36PM +0100, Dodji Seketeli wrote: >> PR debug/49951 >> * g++.dg/gcov/gcov-2.C: New test. > > This change doesn't look like New test, just an adjustment to it... Correct. Below is the adjusted patch.

Re: [PATCH] PR c++/51462 - ICE in cx_check_missing_mem_inits

2012-01-02 Thread Dodji Seketeli
The below passed bootstrap and testing, OK for trunk? Thanks. Dodji Seketeli a écrit: > Jason Merrill writes: > >> On 12/16/2011 11:40 AM, Dodji Seketeli wrote: >>> /* It's OK to skip a member with a trivial constexpr ctor. >>> A const

Re: [PATCH] [RFC] PR debug/49951 - jumpy stepping at end of scope in C++

2012-01-02 Thread Dodji Seketeli
here is the commit I have tested on these branches. commit 399ff82d2ff78acb066b91e5940e815fcdc82ed7 Author: dodji Date: Tue Dec 20 13:36:04 2011 + PR debug/49951 - jumpy stepping at end of scope in C++ gcc/cp/ PR debug/49951 * decl.c (cxx_maybe_build

[PATCH] PR c++/51541 - ICE with invalid identifier in alias-declaration

2012-01-05 Thread Dodji Seketeli
-error "" } +template using typename ::operator bool = void(int n); // { dg-error "" } +using foo __attribute__((aligned(4)) = int; // { dg-error "" } -- 1.7.6.4 -- Dodji

[PATCH] PR debug/45682 - wrong struct DIE nesting with -fdebug-types-section

2012-01-05 Thread Dodji Seketeli
\"\[\n\r\]+\[^\n\r\]*DW_AT_declaration\[\n\r\]+\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\)\[^\n\r\]*DW_TAG_class_type\\)\[\n\r\]+\[^\n\r\]*DW_AT_name: \"Executor\"\[\n\r\]+\[^\n\r\]*DW_AT_declaration\[\n\r\]+\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_class_type\\)\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*0x\\2\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of children of DIE 0x\\1" } } -- 1.7.6.4 -- Dodji

Re: [PATCH] PR debug/45682 - wrong struct DIE nesting with -fdebug-types-section

2012-01-08 Thread Dodji Seketeli
Cary Coutant writes: > Take a look at this and see if it makes sense; Yes, it does make sense to me. Thanks. -- Dodji

[PATCH] PR c++/51633 - ICEs with constexpr constructor

2012-01-11 Thread Dodji Seketeli
;does not have empty body" } +}; + +struct D3 +{ +A a; +A b; +A c; +constexpr D3() { return;} // { dg-error "does not have empty body" } +}; -- 1.7.6.4 -- Dodji

Re: [PATCH] PR c++/51633 - ICEs with constexpr constructor

2012-01-11 Thread Dodji Seketeli
D1() { return;} // { dg-error "does not have empty body" } +}; + +struct D2 +{ +A a; +A b; +constexpr D2() { return;} // { dg-error "does not have empty body" } +}; + +struct D3 +{ +A a; +A b; +A c; +constexpr D3() { return;} // { dg-error "does not have empty body" } +}; -- 1.7.6.4 -- Dodji

Re: [PATCH] PR c++/51633 - ICEs with constexpr constructor

2012-01-12 Thread Dodji Seketeli
Jason Merrill writes: > On 01/11/2012 05:57 PM, Dodji Seketeli wrote: >> + list = cur_stmt_list; >> if (TREE_CODE (list) == BIND_EXPR) >> list = BIND_EXPR_BODY (list); >> if (TREE_CODE (list) == STATEMENT_LIST > > cur_stmt_list shou

Re: [PATCH] PR debug/45682 - wrong struct DIE nesting with -fdebug-types-section

2012-01-16 Thread Dodji Seketeli
laration\[\n\r\]+\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_subprogram\\)\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*DW_AT_name: \"CurrentExecutor\"\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*end of children of DIE 0x\\3\[\n\r]+\[^\n\r\]*end of children of DIE 0x\\1\[\n\r]+" } } -- Dodji

[PATCH] PR testsuite/51941 - FAIL g++.dg/debug/dwarf2/nested-3.C on

2012-01-23 Thread Dodji Seketeli
.ascii "thread\0" # DW_AT_name .byte 0x1 # DW_AT_decl_file (/home/dodji/devel/git/gcc/cur/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C) .byte 0x4 # DW_AT_decl_line .long 0xb7# DW_AT_sibling .byte 0x9 # uleb128 0x9; (DIE

Re: [PATCH] PR c++/50852 - loose template parameter comparison

2012-01-24 Thread Dodji Seketeli
> How about if we just store a pointer to the template parameter list > and do comp_template_parms? I tried a variation of this approach below. My understanding is that comp_template_parms wouldn't work as is, at least because it can lead to an endless recursion: Suppose we start comparing the f

[PATCH] PR c++/51641 - Lookup finds enclosing class member instead of template parameter

2012-01-26 Thread Dodji Seketeli
B { typedef int X; }; +}; + +template struct C : A { +B::X q; // Ok: A::B. +struct U { typedef int X; }; +template +struct D; +}; + +template +template +struct C::D { +typename U::X r; // { dg-error "" } +}; + +C::D y; + -- 1.7.6.5 -- Dodji

Re: [PATCH] PR c++/50852 - loose template parameter comparison

2012-01-26 Thread Dodji Seketeli
it would be OK as cp-tree.h already has a few spots of public entry points "overloaded" using that _real suffix. What suffix would be best? -- Dodji

Re: [PATCH] PR c++/51641 - Lookup finds enclosing class member instead of template parameter

2012-01-27 Thread Dodji Seketeli
nt X; }; +template +struct D; +}; + +template +template +struct C::D { +typename U::X r; // { dg-error "" } +}; + +C::D y; + -- 1.7.6.5 -- Dodji

[PATCH] PR debug/49047 (linkage name missing for cdtors)

2011-05-26 Thread Dodji Seketeli
uite/g++.dg/debug/dwarf2/cdtor-1.C @@ -0,0 +1,17 @@ +// origin PR debug/49047 +// { dg-options "-g -dA" } +// { dg-do compile } + +struct K +{ + K () { } + ~K () { } +}; + +int +main() +{ +K k; +} + +// { dg-final {scan-assembler-times "\[^\n\r\]*DW_AT_MIPS_linkage_name:" 2 } } -- 1.7.3.4 -- Dodji

Re: [PATCH] PR debug/49047 (linkage name missing for cdtors)

2011-05-26 Thread Dodji Seketeli
ns "-g -dA" } +// { dg-do compile } + +struct K +{ + K () { } + ~K () { } +}; + +int +main() +{ +K k; +} + +// { dg-final {scan-assembler-times "\[^\n\r\]*DW_AT_MIPS_linkage_name:" 2 } } -- 1.7.3.4 -- Dodji

Re: [PATCH] PR debug/49047 (linkage name missing for cdtors)

2011-05-30 Thread Dodji Seketeli
@ -0,0 +1,17 @@ +// origin PR debug/49047 +// { dg-options "-g -dA" } +// { dg-do compile } + +struct K +{ + K () { } + ~K () { } +}; + +int +main() +{ +K k; +} + +// { dg-final {scan-assembler-times "\[^\n\r\]*DW_AT_MIPS_linkage_name:" 2 } } -- 1.7.3.4 -- Dodji

[PATCH] Fix PR debug/49130

2011-05-31 Thread Dodji Seketeli
) +{ + S s1; + s1.f(10); +} + +// { dg-final {scan-assembler-times "\[^\n\r\]*DW_AT_name: \"S<2048ul>\"" 1 } } +// { dg-final {scan-assembler-times "\[^\n\r\]*DW_AT_MIPS_linkage_name: \"_ZN1SILm2048EE1fEm\"" 1 } } -- Dodji

[PING] [PATCH] PR preprocessor/48532 (Wrong location in pragma involving macros)

2011-06-03 Thread Dodji Seketeli
cpp_get_token below to set + pfile->invocation_location. */ + pfile->set_invocation_location = true; + } + token = cpp_get_token (pfile); if (token->type == CPP_NAME) p = lookup_pragma_entry (p->u.space, token->val.node.node); -- Dodji --- End Message --- -- Dodji

Re: [PING] [PATCH] PR preprocessor/48532 (Wrong location in pragma involving macros)

2011-06-06 Thread Dodji Seketeli
Tom Tromey a écrit: > Dodji> + context of 'P'. The problem is, if we are beeing > > Typo, "being". > > Ok with that fixed. Thanks. Fixed and committed to revision r174694. -- Dodji

[PATCH] PR debug/49348 (DW_TAG_template_* missing from template specializations)

2011-06-10 Thread Dodji Seketeli
eration_type" 1 } } // { dg-final { scan-assembler-times "\"e0..\"\[^\n\]*DW_AT_name" 1 } } // { dg-final { scan-assembler-times "\"e1..\"\[^\n\]*DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\r\]*\\) DW_TAG_template_value_param" 1 } } template struct foo -- Dodji

[libcpp PATCH] Use source_location where it is due

2011-07-15 Thread Dodji Seketeli
ore_define) (cpp_reader *); -- Dodji

[PATCH 0/7] Tracking locations of tokens resulting from macro expansion

2011-07-16 Thread Dodji Seketeli
Hello, This is an update of the patch set that I initially posted to http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00858.html. The main goals achieved by this set are the following: - Decrease the overall memory consumption. On the tests I have done on a reasonably big C++ program compiled wit

[PATCH 4/7] Support -fdebug-cpp option

2011-07-16 Thread Dodji Seketeli
This patch adds -fdebug-cpp option. When used with -E this dumps the relevant macro map before every single token. This clutters the output a lot but has proved to be invaluable in tracking some bugs during the development of the virtual location support. Tested on x86_64-unknown-linux-gnu against

[PATCH 3/7] Emit macro expansion related diagnostics

2011-07-16 Thread Dodji Seketeli
regression tests have been added. The mandatory screenshot goes like this: [dodji@adjoa gcc]$ cat -n test.c 1#define OPERATE(OPRD1, OPRT, OPRD2) \ 2 OPRD1 OPRT OPRD2; 3 4#define SHIFTL(A,B) \ 5 OPERATE (A,<<,B) 6 7#define MULT(A) \

[PATCH 7/7] Reduce memory waste due to non-power-of-2 allocs

2011-07-16 Thread Dodji Seketeli
This patch basically arranges for the allocation size of line_map buffers to be as close as possible to a power of two. This *significantly* decreases peak memory consumption as (macro) maps are numerous and stay live during all the compilation. Ideally, I'd prefer some parts of this patch to be

[PATCH 5/7] Add line map statistics to -fmem-report output

2011-07-16 Thread Dodji Seketeli
This patch adds statistics about line maps' memory consumption and macro expansion to the output of -fmem-report. It has been useful in trying to reduce the memory consumption of the macro maps support. Tested on x86_64-unknown-linux-gnu against trunk. gcc/ * input.c (ONE_K, ONE_M, SCALE

[PATCH 6/7] Kill pedantic warnings on system headers macros

2011-07-16 Thread Dodji Seketeli
ecs (struct c_declspecs *); +extern struct c_declspecs *finish_declspecs (struct c_declspecs *, location_t); /* in c-objc-common.c */ extern bool c_objc_common_init (void); diff --git a/gcc/testsuite/gcc.dg/cpp/syshdr3.c b/gcc/testsuite/gcc.dg/cpp/syshdr3.c new file mode 100644 index 000

Re: [PATCH 0/7] Tracking locations of tokens resulting from macro expansion

2011-07-16 Thread Dodji Seketeli
Tobias Burnus a écrit: > Dodji Seketeli wrote: >>Support -fdebug-cpp option > > Regarding Fortran: I think having a full support for the macro > expansion would be quite a lot of work, I know nothing about Fortran, but I would hope that adding support for this feature t

Re: [PATCH 1/7] Linemap infrastructure for virtual locations

2011-07-19 Thread Dodji Seketeli
Jason Merrill writes: > On 07/16/2011 10:37 AM, Dodji Seketeli wrote: >> + /* This array of location is actually an array of pairs of >> + locations. The elements inside it thus look like: >> + >> + x0,y0, x1,y1, x2,y2, , xn,yn. > > Pairs

Re: [PATCH 1/7] Linemap infrastructure for virtual locations

2011-07-19 Thread Dodji Seketeli
Jason Merrill writes: > On 07/19/2011 05:42 AM, Dodji Seketeli wrote: >> If you are talking about the case of a macro A that can have (among the >> tokens of its replacement list) a token B that itself is a macro, then >> this is supported by the current setup. > >

[PATCH, Obvious cleanup] Remove parm name from declaration

2011-07-25 Thread Dodji Seketeli
Hello, I committed this obvious header cleanup patch to trunk. -- Dodji gcc/c-family * c-common.h (set_underlying_type): Remove parm name from declaration. diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 202be02..4ac7c4a 100644

[PATCH] PR c++/33255 - Support -Wunused-local-typedefs warning

2011-07-27 Thread Dodji Seketeli
have fixed thus. Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. -- Dodji >From b4612a6dd8a642795fe81398b372746f19c86614 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Mon, 25 Jul 2011 19:02:07 +0200 Subject: [PATCH] PR c++/33255 - Support -Wunused-lo

Re: Remove unused line_maps field last_listed (issue4810058)

2011-07-28 Thread Dodji Seketeli
>set->used = 0; > - set->last_listed = -1; >set->trace_includes = false; >set->depth = 0; >set->cache = 0; > > -- > This patch is available for review at http://codereview.appspot.com/4810058 -- Dodji

Re: [PATCH] PR c++/33255 - Support -Wunused-local-typedefs warning

2011-07-29 Thread Dodji Seketeli
Jason Merrill writes: > On 07/27/2011 01:54 PM, Dodji Seketeli wrote: >> + /* Set of typedefs that are used in this function. */ >> + struct pointer_set_t * GTY((skip)) used_local_typedefs; > > Is there a reason not to just use TREE_USED for this? I wasn't su

Re: [PATCH] PR c++/33255 - Support -Wunused-local-typedefs warning

2011-07-29 Thread Dodji Seketeli
Jason Merrill writes: > On 07/27/2011 01:54 PM, Dodji Seketeli wrote: >> + /* Set of typedefs that are used in this function. */ >> + struct pointer_set_t * GTY((skip)) used_local_typedefs; > > Is there a reason not to just use TREE_USED for this? > >> +

Re: [PATCH] PR c++/33255 - Support -Wunused-local-typedefs warning

2011-07-29 Thread Dodji Seketeli
Jason Merrill writes: > On 07/29/2011 03:35 AM, Dodji Seketeli wrote: >> So do you guys think we should add it nonetheless and just add >> -Wno-unused-local-typedefs to the tests that exhibit the above issue >> before fixing PR preprocessor/7263? > > Does your set

Re: [PATCH] PR c++/33255 - Support -Wunused-local-typedefs warning

2011-07-29 Thread Dodji Seketeli
Jason Merrill writes: > On 07/29/2011 08:36 AM, Dodji Seketeli wrote: >> Looking into this a bit, it seems to me that I can access >> cfun->language->base (of type c_language_function) from inside either >> the C or C++ FE only, as the type of cfun->language

Re: [PATCH 1/7] Linemap infrastructure for virtual locations

2011-08-01 Thread Dodji Seketeli
Jason Merrill writes: > On 07/16/2011 07:37 AM, Dodji Seketeli wrote: >> +/* Returns the highest location [of a token resulting from macro >> + expansion] encoded in this line table. */ >> +#define LINEMAPS_MACRO_HIGHEST_LOCATION(SET) \ >> + LINEMAPS

Re: [PATCH 1/6] Linemap infrastructure for virtual locations

2011-04-12 Thread Dodji Seketeli
Hello, Sorry for getting back to this just now, and thank you very much for the review. Please find below my reply to your comments. Tom Tromey writes: > Dodji>expanded_location xloc; > Dodji>if (loc <= BUILTINS_LOCATION) > Dodji> -{ > Dodji

[PATCH] PR c++/48574

2011-04-13 Thread Dodji Seketeli
e/g++.dg/template/dependent-expr7.C @@ -0,0 +1,22 @@ +// Origin PR c++/48574 +// { dg-do compile } + +struct A +{ + virtual void foo(); +}; + +template +void +bar(T x) +{ + A &b = *x; + b.foo (); +} + +void +foo() +{ + A a; + bar(&a); +} -- Dodji

Re: [PATCH] PR c++/48574

2011-04-13 Thread Dodji Seketeli
>>tree type; >> >> would be shorter, after that if it returns NULL_TREE. > > Yep. Thanks I am committing this then. -- Dodji commit 9ff90e47bafaab67e0c41aa5341a2424726db8a8 Author: Dodji Seketeli Date: Wed Apr 13 12:30:51 2011 +0200 PR

Re: [PATCH 5/6] Add line map statistics to -fmem-report output

2011-04-13 Thread Dodji Seketeli
Hello, Gabriel Dos Reis writes: > On Fri, Dec 10, 2010 at 5:11 AM, Dodji Seketeli wrote: > > This patch adds statistics about the memory consumption of line maps > > to the output of -fmem-report. It has been useful in trying to reduce > > the memory consumption of t

[PATCH] Fix PR c++/48656

2011-04-28 Thread Dodji Seketeli
g-do compile } + +struct A { + int f(); + int f(int); +}; + +template struct B : A +{ +}; + +template struct C : B +{ +void +g() +{ + A::f(); +} +}; -- Dodji

[PATCH] Fix PR c++/48838

2011-05-03 Thread Dodji Seketeli
mSystem::self().registerTypeClass(); +} +}; -- 1.7.3.4 -- Dodji

[PING] [PATCH] PR debug/28767 (Support pointer-to-member-function)

2011-05-03 Thread Dodji Seketeli
the existing code that emits DW_TAG_ptr_to_member_type for ponter-to-data-member types to handle pointer-to-member-function types as well. Tested on x86_64-unknown-linux-gnu against trunk. I am proposing this for 4.7. -- Dodji >From 36d971de3a01c83f8e23c4016262ea73357f6bd6

Re: [PATCH] Fix PR c++/48838

2011-05-05 Thread Dodji Seketeli
+ +template +struct DUChainItemRegistrator +{ +DUChainItemRegistrator() +{ +DUChainItemSystem::self().registerTypeClass(); +} +}; -- Dodji

Re: [PATCH] Fix PR c++/48838

2011-05-05 Thread Dodji Seketeli
Jason Merrill writes: > On 05/05/2011 03:52 PM, Dodji Seketeli wrote: >> + if (is_overloaded_fn (fn)) >> +fn = get_first_fn (fn); >> + else if (BASELINK_P (fn)) > > is_overloaded_fn should be true for a BASELINK. Correct. I should have seen that. I have bootst

[PATCH] Fix PR c++/48574

2011-05-05 Thread Dodji Seketeli
uot; } +// { dg-do compile } + +struct A +{ + virtual int foo(); +}; + +void baz (int); + +template +void +bar(T x) +{ + A &b = *x; + baz (b.foo ()); +} + +void +foo() +{ + A a; + bar(&a); +} -- Dodji

Re: [PATCH] Fix PR c++/48574

2011-05-06 Thread Dodji Seketeli
.C @@ -0,0 +1,25 @@ +// Origin PR c++/48574 +// { dg-options "-std=c++0x" } +// { dg-do compile } + +struct A +{ + virtual int foo(); +}; + +void baz (int); + +template +void +bar(T x) +{ + A &b = *x; + baz (b.foo ()); +} + +void +foo() +{ + A a; + bar(&a); +} -- Dodji

[PATCH] PR c++/47957

2011-03-07 Thread Dodji Seketeli
n-linux-gnu against trunk. -- Dodji >From 48496aa3972649c82bc1c16c59c461102270caad Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Mon, 7 Mar 2011 16:47:17 +0100 Subject: [PATCH] PR c++/47957 gcc/cp/ * name-lookup.c (binding_to_template_parms_of_scope_p): Only

[PATCH] PR c++/PR48035

2011-03-10 Thread Dodji Seketeli
ja-gnu test for this PR, and for bootstrapping the patch on his fast iron on i686 and x86_64 for all languages. -- Dodji >From b52987810a313657202fc7ecae6b503311146302 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Thu, 10 Mar 2011 14:10:05 +0100 Subject: [PA

Re: [PATCH] PR c++/PR48035

2011-03-10 Thread Dodji Seketeli
recommended custom. Thanks for the notice. -- Dodji

Re: [PATCH] PR c++/PR48035

2011-03-11 Thread Dodji Seketeli
lds to zero, because, e.g, for member pointers fields the ABI states that a NULL pointer is represented as -1. So this is the patch I am currently testing. -- Dodji >From 6a757e998cb6b09883ec366c8c8939a70a215600 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: F

[PATCH] PR c++/46824

2011-03-11 Thread Dodji Seketeli
ed since then. So I removed the "complete" from the comment. I wish I had double checked that in the spec earlier :-( Here is the patch I am currently testing against trunk. -- Dodji >From 9d9f38e1ef36a6ae1240f72834ed6657e382dc0e Mon Sep 17 00:00:00 2001 From: Dodji S

Re: PR debug/47510

2011-03-14 Thread Dodji Seketeli
that we can backport to 4.6 after its release. -- Dodji >From 5cc08083834604525a11e4e4b6de830734520f6e Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Fri, 28 Jan 2011 11:53:49 +0100 Subject: [PATCH] PR debug/47510 PR debug/47510 * gcc/dwarf2out.c (strip_na

Re: PR debug/47510

2011-03-16 Thread Dodji Seketeli
ode. I see. I was perhaps being too conservative in my judgement here. FWIW assuming the patch gets reviewed I'd second your request in asking RM to consider this for 4.6. -- Dodji

[PATCH] PR debug/28767 (Support pointer-to-member-function)

2011-03-16 Thread Dodji Seketeli
-to-member-function types as well. Tested on x86_64-unknown-linux-gnu against trunk. I am proposing this for 4.7. -- Dodji >From 36d971de3a01c83f8e23c4016262ea73357f6bd6 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 15 Mar 2011 16:50:30 +0100 Subject: [PATCH] PR de

Re: PR debug/47510

2011-03-16 Thread Dodji Seketeli
. I think this makes sense. Tom, Jan, would this be good enough from a debug info consumer point of view? If yes I'll propose a separate patch for this a bit later. -- Dodji

Re: PR debug/47510

2011-03-17 Thread Dodji Seketeli
that. Back to the discussion now :-) Mark Mitchell writes: > On 3/16/2011 1:04 PM, Dodji Seketeli wrote: > >> Would the RMs (in CC) object to this patch going into 4.6? > What would be the justification for that? It's a regression from 4.5, caused by the fix for PR c+

Re: PR debug/47510

2011-03-17 Thread Dodji Seketeli
Mark Mitchell writes: > And, in any case, if it's a regression it's OK with me. Thanks. I have committed the patch back into 4.6. -- Dodji

[PATCH] PR debug/47471 (set prologue_end in .debug_line)

2011-03-30 Thread Dodji Seketeli
ctive to be emitted even when we compile with optimizations. I am not sure how right that would be. Tested on x86_64-unknown-linux-gnu against trunk. -- Dodji >From dc3dea429f1471540867a0b7e694a60494062ac0 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 29 Mar 20

Re: [PATCH] PR debug/47471 (set prologue_end in .debug_line)

2011-03-31 Thread Dodji Seketeli
e DW_AT_location attributes of the variable DIEs are locations that are valid in the region of the prologue, so it doesn't need to know where the prologue ends. Just trusting DW_AT_location is enough. I am currently testing the stripped down patch below. Thanks. --

[PATCH] PR preprocessor/48532 (Wrong location in pragma involving macros)

2011-04-10 Thread Dodji Seketeli
e context of a macro expansion, (and we + are) and then use pfile->invocation_location as the + location of the macro invocation. So we must instruct + cpp_get_token below to set + pfile->invocation_location. */ + pfile->set_invocation_location = true; + } + token = cpp_get_token (pfile); if (token->type == CPP_NAME) p = lookup_pragma_entry (p->u.space, token->val.node.node); -- Dodji

<    1   2   3   4   5   6