Re: [libcc1] add support for C++

2017-05-29 Thread Nathan Sidwell
On 05/29/2017 04:21 PM, Alexandre Oliva wrote: Here's what I'm checking in, trunk and gcc-7-branch. Regstrapped on x86_64-linux-gnu and i686-linux-gnu. [libcc1] drop unused field from C++ lang_identifier for gcc/cp/ChangeLog * cp-tree.h (lang_identifier): Drop oracle_looked_up, unus

Re: [libcc1] add support for C++

2017-05-29 Thread Alexandre Oliva
On May 28, 2017, Alexandre Oliva wrote: > Oh, no! I put it there temporarily, very early in the project, because > I couldn't find a better place (I looked for available bits elsewhere, > and I recall I couldn't find any); at the end we moved to a hash_set > (see query_oracle below), that makes

Re: [libcc1] add support for C++

2017-05-28 Thread Alexandre Oliva
On May 26, 2017, Richard Biener wrote: > On Mon, Jan 30, 2017 at 11:31 PM, Alexandre Oliva wrote: > bool oracle_looked_up; > that increased lang_identifier size by 8 bytes while there's "plenty" of free > bits in tree_base (bonus point if you can reap a lang_flag). Oh, no! I put it there te

Re: [libcc1] add support for C++

2017-01-27 Thread Jason Merrill
On Thu, Jan 26, 2017 at 9:11 PM, Alexandre Oliva wrote: > - introduced, new_friend can be called after the befriended class is > + introduced, new_friend can be called after the befriending class is s/new/add/ in the comment, too. > +/* Build a template-dependent template type id (e.g., T).

Re: [libcc1] add support for C++

2017-01-26 Thread Alexandre Oliva
Here are the incremental changes that, together, address all of your feedback (thanks!), but separated in logically-related patches. In a separate message, I'll post an updated, consolidated patch. Rename ansi_*opname; export cp_literal_operator_id diff --git a/gcc/cp/call.c b/gcc/cp/call.c ind

Re: [libcc1] add support for C++

2017-01-24 Thread Jason Merrill
On Tue, Jan 24, 2017 at 3:43 PM, Alexandre Oliva wrote: > On Jan 24, 2017, Jason Merrill wrote: >> On Mon, Jan 23, 2017 at 7:21 PM, Alexandre Oliva wrote: >>> On Jan 23, 2017, Jason Merrill wrote: >>> >>> + If the newly-created namespace is to be an inline namespace, after >>> + pus

Re: [libcc1] add support for C++

2017-01-24 Thread Alexandre Oliva
On Jan 24, 2017, Jason Merrill wrote: > On Mon, Jan 23, 2017 at 7:21 PM, Alexandre Oliva wrote: >> On Jan 23, 2017, Jason Merrill wrote: >> >> + If the newly-created namespace is to be an inline namespace, after >> + push_namespace, get the nested namespace decl with >> + get

Re: [libcc1] add support for C++

2017-01-24 Thread Jason Merrill
On Mon, Jan 23, 2017 at 7:21 PM, Alexandre Oliva wrote: > On Jan 23, 2017, Jason Merrill wrote: > > + If the newly-created namespace is to be an inline namespace, after > + push_namespace, get the nested namespace decl with > + get_current_binding_level, pop back to the enclosin

Re: [libcc1] add support for C++

2017-01-23 Thread Alexandre Oliva
On Jan 23, 2017, Jason Merrill wrote: > Better to fix an inconsistent API now than leave it to confuse future > developers, I would think. Here's an incremental patch to the API, with all the proposed name changes to make the whole thing more consistent (the conventions are made explicit at the

Re: [libcc1] add support for C++

2017-01-23 Thread Alexandre Oliva
On Jan 22, 2017, Alexandre Oliva wrote: > On Jan 13, 2017, Jason Merrill wrote: >> On 09/23/2016 08:41 PM, Alexandre Oliva wrote: >>> +/* Create a modified version of a function type that has default >>> + values for some of its arguments. The returned type should ONLY be >>> + used to defi

Re: [libcc1] add support for C++

2017-01-23 Thread Alexandre Oliva
On Jan 23, 2017, Jason Merrill wrote: > On Sun, Jan 22, 2017 at 6:06 PM, Alexandre Oliva wrote: >> On Jan 13, 2017, Jason Merrill wrote: >> >>> On 09/23/2016 08:41 PM, Alexandre Oliva wrote: +static tree global_friend_list; >> >>> This should be a hash_set rather than a TREE_LIST. >> >>

Re: [libcc1] add support for C++

2017-01-23 Thread Jason Merrill
On Sun, Jan 22, 2017 at 6:06 PM, Alexandre Oliva wrote: > On Jan 13, 2017, Jason Merrill wrote: > >> On 09/23/2016 08:41 PM, Alexandre Oliva wrote: >>> +static tree global_friend_list; > >> This should be a hash_set rather than a TREE_LIST. > > You sure? At least in the libcc1 use scenario, this

Re: [libcc1] add support for C++

2017-01-23 Thread Joseph Myers
On Sun, 22 Jan 2017, Alexandre Oliva wrote: > On Jan 13, 2017, Jason Merrill wrote: > > > On 09/23/2016 08:41 PM, Alexandre Oliva wrote: > >> +static tree global_friend_list; > > > This should be a hash_set rather than a TREE_LIST. > > You sure? At least in the libcc1 use scenario, this is go

Re: [libcc1] add support for C++

2017-01-22 Thread Alexandre Oliva
On Jan 13, 2017, Jason Merrill wrote: > On 09/23/2016 08:41 PM, Alexandre Oliva wrote: >> +static tree global_friend_list; > This should be a hash_set rather than a TREE_LIST. You sure? At least in the libcc1 use scenario, this is going to have a single entry. I didn't even have to make it a

Re: [libcc1] add support for C++

2017-01-21 Thread Alexandre Oliva
On Jan 13, 2017, Jason Merrill wrote: > Again, sorry for the delay, and thank you for the continued pings. Thanks for the detailed review, and sorry about the delayed response. It caught me on the way out for a family vacation trip, and I could only see it when I got back home today. I'll have

Re: [libcc1] add support for C++

2017-01-13 Thread Jason Merrill
Again, sorry for the delay, and thank you for the continued pings. Did you see my earlier review of the dwarf2out changes? On 09/23/2016 08:41 PM, Alexandre Oliva wrote: +/* Scopes (functions, classes, or templates) in the TREE_VALUE of + GLOBAL_FRIEND_LIST are regarded as friends of every c

Re: [libcc1] add support for C++

2017-01-04 Thread Alexandre Oliva
On Dec 14, 2016, Alexandre Oliva wrote: > On Oct 19, 2016, Alexandre Oliva wrote: >> On Sep 23, 2016, Alexandre Oliva wrote: >>> This patchset adds support for the C++ language to libcc1. >>> It updates a few patches for libcc1 by Jan Kratochvil, posted long ago >>> but IIRC not reviewed; it up

Re: [libcc1] add support for C++

2016-12-14 Thread Alexandre Oliva
On Oct 19, 2016, Alexandre Oliva wrote: > On Sep 23, 2016, Alexandre Oliva wrote: >> This patchset adds support for the C++ language to libcc1. >> It updates a few patches for libcc1 by Jan Kratochvil, posted long ago >> but IIRC not reviewed; it updates a patch that adds support for >> represen

Re: [libcc1] add support for C++

2016-10-19 Thread Alexandre Oliva
On Sep 23, 2016, Alexandre Oliva wrote: > This patchset adds support for the C++ language to libcc1. > It updates a few patches for libcc1 by Jan Kratochvil, posted long ago > but IIRC not reviewed; it updates a patch that adds support for > representing aliases and trampolines in dwarf2+ debug i