lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190530195724.GA2870@avx2>
Date:   Thu, 30 May 2019 22:57:25 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     David Laight <David.Laight@...LAB.COM>
Cc:     "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] add typeof_member() macro

On Thu, May 30, 2019 at 11:37:42AM +0000, David Laight wrote:
> From: Alexey Dobriyan

> > +#define typeof_member(T, m)	typeof(((T*)0)->m)
> 
> Should probably be 't' (not 'T') and upper case ?

T comes from C++ where they uppercase types in template arguments.
It makes sense as types stand out sligthly around lowercase identifiers.

> Hmmm.... the #define is longer that what it expands to ...

It hides cast of 0 which is implementation detail :^)

Proper syntax would be

	typeof(struct foo::bar)

but one can only dream.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ