On 19 June 2007 16:35, bjzheng wrote:
> Hello all:
>
> I am reading codes of gcc front end. But I can not find the implementation
> of "sizeof". How does gcc front end calculate size of UNION and STRUCT?
> Where is the codes for these work. Can anybody give me some advices? Thank
> you so much !
grep _sizeof /gnu/gcc/gcc/gcc/*.[ch]
Look at c_sizeof_or_alignof_type, #define c_sizeof(T) and #define
c_alignof(T) in c-common.c, and look at c_parser_sizeof_expression in
c-parser.c
cheers,
DaveK
--
Can't think of a witty .sigline today....