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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 May 2007 11:40:47 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	"Robert P. J. Day" <rpjday@...dspring.com>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [PATCH] MIPS: Transform old-style macros to newer "__noreturn"
 standard.

Robert P. J. Day wrote:
> Convert old/obsolete NORET_TYPE and ATTRIB_NORET macros to use the
> newer standard of "__noreturn" as defined in compiler-gcc.h.
> 
> Signed-off-by: Robert P. J. Day <rpjday@...dspring.com>

> 1) in a function declaration, the "__noreturn" will go at the end of
> the declaration.
> 
> 2) in a definition, "__noreturn" will go between the return type and
> the function name
> 
> 3) in a function typedef, "__noreturn" will go immediately after the
> return type, just like with definitions.
> 
> 4) if a function definition already includes "__noreturn", there's no
> point in having any external references to it also say the same thing.
> (right?)

This is dumb, though.

"void __noreturn" is redundant.  It would be much cleaner to have a
macro which amounts to "void __attribute__((noreturn))" and use it
instead of giving a return type.

Even "void" as the return type is bogus -- the function never returns so
it doesn't *have* a return type...

	-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ