[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] How to optimize compiling sizeof const?
From: |
YX Hao |
Subject: |
Re: [Tinycc-devel] How to optimize compiling sizeof const? |
Date: |
Fri, 1 Aug 2014 18:54:59 +0800 |
Hi there,
grischka is right.
My test:
The library file totally reduced 80KB.
A for test executable file reduced 24KB.
Thanks!
> grischka wrote:
>
> YX Hao wrote:
> > Hi,
> >
> > I mean just Ramsay Jones wrote.
> >
> >> the expression:
> >>
> >> sizeof("a string literal")
> >>
> >> was causing an _unused_ copy of the string literal to be stored in
> >> the data section. This expression is a compile-time constant and,
> >> once it has been evaluated, the string literal is no longer required
> >> (even at compile time).
> > -----------^^^^^^^-------- Here, may be you are right, I don't know that.
> >
> > I think the string is useless to store into a compiled file.
>
> I think I fixed that:
> http://repo.or.cz/w/tinycc.git/commitdiff/14745bdeb735d565b7589ba6032abd75
> 5267c850
>
Yes!
Regards,
YX Hao