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: <20160529190712.14364.qmail@ns.sciencehorizons.net>
Date:	29 May 2016 15:07:12 -0400
From:	"George Spelvin" <linux@...encehorizons.net>
To:	geert@...ux-m68k.org, linux@...encehorizons.net,
	torvalds@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] test/hash: Fix warning in preprocessor symbol evaluation

> But here's an alternative.  Geert, what do you think of this?

Never mind; that doesn't work.  Plain gcc-4.9 passes, it, but it's the
"-Wundef" flag that the kernel uses that triggers it.

So we're back to Geert's original suggestion.
Acked-by: George Spelvin <linux@...encehorizons.net>

==>$ cat foo.c
#ifndef FOO
This is a test.
#elif FOO == 1
This is another test
#elif FOO + 0 == 1
who knows
#endif

==>$ gcc-6 -W -Wall -Wundef -E foo.c
# 1 "foo.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "<command-line>" 2
# 1 "foo.c"

This is a test.

==>$ gcc-4.9 -W -Wall -Wundef -E foo.c
# 1 "foo.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "foo.c"

foo.c:3:7: warning: "FOO" is not defined [-Wundef]
 #elif FOO == 1
       ^
foo.c:5:7: warning: "FOO" is not defined [-Wundef]
 #elif FOO + 0 == 1
       ^
This is a test.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ