[PATCH] Come up with constructors of symtab_node, cgraph_node and varpool_node.

Martin Liška mliska@suse.cz
Thu Dec 5 15:25:00 GMT 2019


On 12/5/19 4:17 PM, Martin Liška wrote:
> On 12/5/19 4:12 PM, Richard Biener wrote:
>> Isn't there std::default_constructible? Also after your patch it's far from obvious which api to use.
> 
> Will it work with:
> 
> struct Foo
> {
>    Foo(int) {}
> };
> 
> 
> ...
> if (std::default_constructible<T> ())
>     ptr = new ptr T ();
> 
> ?
> Wouldn't we end up with a compilation error that T() does not exist?
> 
> Well, I don't insist on the ggc_new function. I can easily leave it.
> 
> Martin
> 
>>
>> Richard.
> 

Anyway there's updated patch that I'm testing.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Come-up-with-constructors-of-symtab_node-cgraph_node.patch
Type: text/x-patch
Size: 7407 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191205/a3f6a672/attachment.bin>


More information about the Gcc-patches mailing list