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:
>> I'll again point out that in your reset-vector example you don't
>> actually need any pointer operations.
> 
> I'm not trying to dereference any of these nonstandard pointers. 

Good!  In that case, you don't need them to be pointers at all. :-)

I think you should just declare them as integer types.  (You can give
them pointer-sounding typedef names.)  Then, provide builtins for
converting to/from real pointers.

The other things:

> assignment, copy, storage, cast to/from integers, etc.

will then just work.

> Rarely, calling a function indirectly, but
> that would have to be specific to the target, and documented therein.

Again, a built-in will work here.

If you avoid trying to introduce multiple *pointer* types, and just
treat these things as *integer* types, you avoid all of the hard
language issues.

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