Re: [patch 5/9] x86_64: arch_pick_mmap_layout() fixlet

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

 




On Fri, 6 Jul 2007, Derek M Jones wrote:
> 
> > Returning a void-valued expression in a void-valued function is proper C99
> > (and gcc has allowed it for longer). And it often makes for 
> 
> No such change was made in C99.
> Sentence 1785 http://c0x.coding-guidelines.com/6.8.6.4.html

Oops. Ok, my bad. It's apparently just a long-time gcc feature.

It's one that I was initially surprised by, but it's certainly a sensible 
one from a type standpoint, and a lot better thought out than some gcc 
extensions ;)

So I do actually like it. It's much nicer exactly for code like

	if (somecase)
		return that_case_handler();

where the type of the function to handle the case matches the type of the 
calling function (regardless of whether that type is void or not, but 
void obviously is a special case).

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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