[PATCH] Named address support for GCC 4.5
Thu Dec 4 19:33:00 GMT 2008
On Wed, Dec 03, 2008 at 12:49:47AM +0000, Joseph S. Myers wrote:
> But qualifiers on function types themselves, as opposed to on function
> return types, are disallowed, and the several places with one of these
> diagnostics are where this is checked (and each such case needs a
> testcase). Yes, there should be an error for this - but the previous code
> isn't such an error.
I'm starting to dig through all of your comments (thank you by the way for a
Section 5.1.2 of the ISO/IEC TR 18037:2006(E) states:
Note that, since a function is not an object, address-space type
qualifiers cannot be used with functions.
> comp_target_types to reject the problem cases. Furthermore, the issue
> applies to all cases where both operands are pointers (even I think where
> one is a null pointer constant - which will have to point into the generic
> address space), not just the one where they are pointers to possibly
> differently qualified versions of compatible types.
In terms of NULL pointers, 5.1.3 of the ISO/IEC TR 18037:2006(E) states:
A null pointer into one address space can be cast to a null pointer
into any overlapping address space.
Which means I need to continue stripping address space qualifiers in the case
of null pointer constants (but obviously not others).
I agree with you that common_pointer is the wrong hook, and the tests need to
be moved higher.
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
More information about the Gcc-patches