> Note that there *is* a subtyping relationship here:  a normal
> function can be safely used as a returns_twice function (which simply
> never actually returns twice).  But that's useless.
>
> I agree that abstractly this ought to be a type attribute, and I
> don't think it would be difficult to take advantage of the current
> 'noreturn conversion' hooks to make the (unsafe) implicit conversion
> work, but I'm not sure there's any real value to adding this
> complexity.

OK, so I think the consensus is

* The hard coded list will be removed after 3.0 branches and dragonegg 
producing this attribute too.
* The attribute should be part of the type
* We should try to avoid allowing unsafe conversions like

int (*fptr)(jmp_buf) = &setjmp;

but a returns_twice function pointer can point to a function with an 
otherwise matching type.

I will update the patch and add tests for that.

> John.

Thanks!
Rafael
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to