"Bernhard R. Link" <[EMAIL PROTECTED]> writes:

| * Ian Lance Taylor <[EMAIL PROTECTED]> [061108 16:15]:
| > This assumes, of course, that we can build an equivalence set for
| > types.  I think that we need to make that work in the middle-end, and
| > force the front-ends to conform.  As someone else mentioned, there are
| > horrific cases in C like a[] being compatible with both a[5] and a[10]
| > but a[5] and a[10] not being compatible with each other, and similarly
| > f() is compatible with f(int) and f(float) but the latter two are not
| > compatible with each other.
| 
| Isn't void* and anyothertype* the same case?
| And how are classes and parent classes made compatible in C++?

For C++, in computing the canonical type, you typicall don't use
"compatible."  You ultimately use the quintescence of the ODR.
void* is a type different from "anyothertype*".  
Similarly, a class is different from its base classes.

| Is the
| front end always making a implicit type conversion or are they 'equivalent'
| in one direction?

There is no implicit conversion.

-- Gaby

Reply via email to