empty structs

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

 



Andreas Schwab wrote:
> Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

>> Just to throw an idea out: you can also do something like
>>
>> #ifndef NO_POSIX_GOODIES
>> struct credentials {
>> };
>> #else
[...]
> Empty structures are not standard C.

(For those following at home:

	"A structure type describes a sequentially allocated
	 nonempty set of member objects (and, in certain
	 circumstances, an incomplete array), each of which
	 has an optionally specified name and possibly
	 distinct type.")

So I guess future patches following the pattern of v1.7.3-rc0~33^2~13
git wrapper: introduce startup_info struct, 2010-08-05) should be
written like

	struct startup_info {
		char dummy;
	};

Yuck.  Thanks for the pointer.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]