Messages in this thread | | | Subject | Re: [PATCH] drivers/usb: Convert concatenated __FILE__ to %s, __FILE__ | From | Joe Perches <> | Date | Mon, 08 Feb 2010 14:47:11 -0800 |
| |
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.
| |