[cxx-abi-dev] restrict & overloading

Mark Mitchell mark at codesourcery.com
Wed Feb 18 22:55:07 UTC 2004


> 
> 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.

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.

-- 
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com



More information about the cxx-abi-dev mailing list