[cxx-abi-dev] restrict & overloading

John H. Spicer jhs at edg.com
Wed Feb 18 23:49:30 UTC 2004


Mark Mitchell wrote:
> 
>>
>> True but there is more to it than invalid programs.
>>
>> // File 1:
>> void f(int **) {}
>>
>> // File 2:
>> void f(int *restrict*) {}
>>
>> If this ends up being allowed by WG21 (while overload
>> resolution will likely not distinguish these), the ABI
>> note will keep us from being conformant.

Ah, but overload resolution *does* distinguish these.  It is only at the top 
level that there is no effect on overload resolution.

John.

> 
> 
> I see what you are getting at now.
> 
> I don't think that when the ABI was designed anybody expect that WG21 
> would (a) allow both of those definitions in a single program, and (b) 
> not distinguish them via overloading.  Clearly, if that is what happens, 
> then the ABI will have to be changed to unambiguously require mangling 
> "restrict" into the name of the second one.
> 
> I preferred just to leave "restrict" out of the ABI standard, since 
> nobody was really sure what the eventual semantics would have be, but 
> now we are where we are.
> 
> Anyhow, I can't see that it makes sense to change the ABI specification 
> until/unless WG21 makes a final decision about what it wants to require.
> 




More information about the cxx-abi-dev mailing list