Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cxx-abi-dev] restrict & overloading


  • To: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
  • Subject: Re: [cxx-abi-dev] restrict & overloading
  • From: "John H. Spicer" <jhs@xxxxxxx>
  • Date: Wed, 18 Feb 2004 18:49:30 -0500

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.