This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: does gcc support multiple sizes, or not?


DJ Delorie wrote:
>> Good!  In that case, you don't need them to be pointers at all. :-)
>>
>> I think you should just declare them as integer types.
> 
> That makes initializing function pointers messy.
> 
> Besides, they're not integers.  They're pointers.  I'd *like* to be
> able to dereference them in some simple ways in the future; telling me
> to "just use integers" is a step backwards.  Why don't I "just use
> assembler" or "just use C"?  that defeats the whole purpose of having
> a high level language.

I think we're going to have to agree to disagree.

Sure, it would be nice if these things were pointers.  I'd be happy to
see a specification for how these alternative pointers work, and I'd be
happy to consider a patch that made a serious stab at implementing that
specification.

However, I will reject any patch to support these alternative pointers
in C++ until all the language issues have been resolved.  I'm strongly
opposed to adding more extensions to GNU C++ without thinking through
all of their implications.  We've suffered far too much pain for far too
many years because of doing precisely this in the past.

I would also argue against this extension in C at this point because
users expect GNU C extensions to work in C++ as well.  However, I think
it would be presumptuous for me to try to reject supporting these
pointers in GNU C; that's for the C maintainers to say.

Since you seem to be hesitant (and, reasonably so, in my opinion!) to
work on the language-design issues for C++, I would recommend the
integer approach as a way of providing the functionality you need in the
short term.

Sorry,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]