lkml.org 
[lkml]   [2010]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drivers/usb: Convert concatenated __FILE__ to %s, __FILE__
From
Date
On Sun, 2010-02-07 at 20:49 -0800, Greg KH wrote:
> On Fri, Feb 05, 2010 at 05:51:13PM -0800, Joe Perches wrote:
> > Reduces string space a bit
> It does? Does gcc optimize all of the __FILE__ instances to point to
> the same place in the object?

Yes, just like any other duplicated const string.

Converting a source unit with a single use of __FILE__
wastes space (direct string vs pointer + "%s" + string)

Multiple conversions generally save space.




\
 
 \ /
  Last update: 2010-02-08 23:49    [W:0.033 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site