On Wed, Mar 5, 2014 at 6:50 PM, Andres Freund <and...@2ndquadrant.com> wrote: > On 2014-03-05 17:40:56 -0500, Tom Lane wrote: >> I don't believe that this is legal per C90: >> >> typedef struct ReorderBufferChange >> { >> XLogRecPtr lsn; >> >> /* type of change */ >> union >> { >> enum ReorderBufferChangeType action; >> /* do not leak internal enum values to the outside */ >> int action_internal; >> }; >> >> ... >> >> That union field needs a name. > > You're absolutely right. > >> Our project standard is we compile on C90 compilers, and we're not >> moving that goalpost just to save you a couple of keystrokes. > > While it's a good idea to try to save keystrokes the actual reason is > that I just had somehow forgotten that it hasn't always been > supported. I think it's not even C99, but C11...
Urgh. I know that isn't per project style, but I just plain missed it while staring at these patches. At one point I thought of complaining that separating the public and private values was not a worthwhile endeavor, but I don't think I ever did. Still, I agree with Tom's suggestion of dumping the distinction. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers