Re: embedded list v3

Andres Freund <andres@2ndquadrant.com>

From: Andres Freund <andres@2ndquadrant.com>
To: pgsql-hackers@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Peter Geoghegan <peter@2ndquadrant.com>
Date: 2012-09-30T21:42:56Z
Lists: pgsql-hackers
On Sunday, September 30, 2012 10:48:01 PM Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > Perhaps we need to decouple _Static_assert support from compound
> > statement support at some point, but we will see.
> 
> Yeah, possibly, but until we have an example of a non-gcc-compatible
> compiler that can do something equivalent, it's hard to guess how we
> might need to alter the autoconf tests.  Anyway the important thing
> for now is the external specification of the macros, and I think we're
> good on that (modulo any better naming suggestions).
I thought msvc supported _Static_assert as well, but after a short search it 
seems I misremembered and it only supports static_assert from C++11 (which is 
plausible, because I've worked on a C++11 project which was ported to windows 
). I don't know how C and C++ compilation modes are different in msvc.

I really don't understand why C and C++ standard development isn't coordinated 
more... They seem to come up with annoying incompatibilities all the time.

> I'm fairly sure there are already a few cases of Asserts on
> compile-time-constant expressions, so I made sure that there was a layer
> allowing access to _Static_assert without the type-compatibility code.
> I didn't go looking for anything to convert, but I think there's some
> in the shared memory initialization code.
Definitely a sensible goal. I wasn't really sure how well the idea would be 
received after I asked before and only heard echoes of my excitement and didn't 
want to spend too much time on it...

Greetings,

Andres
-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Provide some static-assertion functionality on all compilers.

  2. Add infrastructure for compile-time assertions about variable types.

  3. Remove 576 references of include files that were not needed.

  4. More include file adjustments.

  5. Allow each C include file to compile on its own by including any needed