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?


> > typedef void (*ifunc)() __attribute__((mode(SI)));
> > ifunc __attribute__((section(".resetvec"))) reset_vector = start;
> 
>  Maybe it is just me, but it seems more natural to have:
> typedef void (*long ifunc)();

You can use #defines to make it pretty:

#define far __attribute__((mode(SI)))

typedef void (* far ifunc)();
extern ifunc ivects[];

>  But short pointer have a use (reduce array size of pointers to
>  local objects),

I think you'll find that implementing this is much more of a project
that what I need long/short pointers for.  You want multiple *default*
pointer sizes; I just want an exception that the programmer can use
for odd cases.


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