lkml.org 
[lkml]   [2019]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] string-choice: add yesno(), onoff(), enableddisabled(), plural() helpers
From
Date
On 24/10/2019 09.40, Rasmus Villemoes wrote:

> column. Maybe your compiler doesn't do string literal merging (since the
> linker does it anyway), so your .rodata.str1.1 might contain several
> copies of "yes" and "no", but they shouldn't really be counted.

Sorry, that's of course nonsense - the strings only appear once in the
TU (inside the static inline function), so gcc must treat them all as
the same object - as opposed to the case where the implementation was

#define yesno(x) ((x) ? "yes" : "no")

So that can't explain why you saw a smaller text segment using the OOL
version.

Rasmus

\
 
 \ /
  Last update: 2019-10-24 09:58    [W:0.038 / U:2.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site