Re: [PATCH 4/5] propagate function modifiers only to functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 20, 2019 at 01:36:57PM +0000, Ramsay Jones wrote:
> 
> 
> On 20/11/2019 02:13, Ramsay Jones wrote:
> [snip]
> 
> > 
> > Hmm, shouldn't these:
> > 
> >> +	{"const",	NS_KEYWORD,	MOD_PURE,	.op = &attr_fun_op },
> >> +	{"__const",	NS_KEYWORD,	MOD_PURE,	.op = &attr_fun_op },
> >> +	{"__const__",	NS_KEYWORD,	MOD_PURE,	.op = &attr_fun_op },
> > 
> > ... be attr_mod_op? (I'm just reading this in my email client, so I
> > haven't given it much thought, but it just seems wrong ...)
> 
> Of course, as soon as my head hit the pillow, I remembered that
> gcc has a 'const function attribute', somewhat similar to 'pure'.
> (I just looked it up, because I couldn't remember what the
> difference was between 'const' and 'pure'!).
> 
> So, just ignore me! :-D

Hehe, I already had the case at several times when I saw these,
thinking "eh! that cannot possible be correct" and then "ah yes,
these are not for the 'real' const, it's for the other one" ;)

-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux