Re: sizeof(function) functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > #define sizeof_function(x) ( (unsigned long) (&(endof_##x)) - (unsigned
> > long) (&x))
> > #define endof_function(x) void volatile endof_##x() {}
> > #define DECLARE_END_OF_FUNCTION(x) void endof_##x();
> >
> > Note the volatile keywoard, also used when functions are declared.
> 
> Was there supposed to be a volatile keyword in the DECLARE_END_OF_FUNCTION 
> macro?

Yes! Thank you.

> > It
> > has the effenct of the function and its end  sticking next to each
> > other, or at least out of what I noticed:
> 
> What leads you to this conclusion? Do they not stick next to each other 
> otherwise?

Are they guaranteed to stick together when passing -O4 to gcc?



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux