On 16/05/2012 19:14, Grant Edwards wrote:
> On 2012-05-16, Stefan N?rnberger<s...@zelle79.org>  wrote:
>
>> If it is purely about code size you should definitely compile without
>> the debugging symbols (drop the -g switch). This should reduce the
>> size of the binary dramatically.
>
> If that's true, it's a compiler bug isn't it?.  Enabling debug symbols
> should not affect the generated code or the size of the resulting text
> segment. Enabling debug symbols with certain types of optimization
> doesn't always produce usable results (in terms of setting breakpoints
> on particular source lines, single-stepping, etc.), but it shouldn't
> produce a larger code size.
>

Sometimes the ability to debug conflicts with the optimiser, as you say. 
  When gcc is used both with "-g" and with heavy optimisations, it does 
its best to resolve them and give you debugable optimised code.  But I 
am not sure whether it always sacrifices debugging to give you optimal 
code when there is a conflict - it may pick a different balance.  So 
removing the debug flag is worth trying, as it /may/ have some effect - 
but it will only be a very marginal effect at most.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to