tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2
Date: Fri, 16 Nov 2012 23:00:47 +0100
User-agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; )

Le vendredi 16 novembre 2012 22:07:52, Thomas Preud'homme a écrit :
> Le jeudi 15 novembre 2012 18:34:51, grischka a écrit :
> 
> > Compare
> > 
> >       put_sym_attr(s1, sym_index, got_offset, s1->got->data_offset);
> > 
> > with
> > 
> >       alloc_sym_attr(s1, sym_index)->got_offset = s1->got->data_offset;

> > 
> > Is this C?  Note that not just GCC and TCC might be used to compile
> > tcc.  (E.g. more recent MS compilers from the VCExpress editions used
> > to work)
> 
> I thought so but it seems I've been intoxicated by gccism. I checked the
> C99 standard and it's not inside. In this case it can easily be changed by
> void * while still keeping sym_attrs an anonymous struct.

Except that it doesn't work for alloc_sym_attr. To be able to do ->got_offset 
the type returned must be the one of sym_attrs.

I thus propose to create struct sym_attr.

> 
> > Thanks,
> > 
> > --- grischka
> 
> Tom

Thomas

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]