RE: Proposal: Add more compile-time asserts to exposeinconsistencies. - Mailing list pgsql-hackers

From Smith, Peter
Subject RE: Proposal: Add more compile-time asserts to exposeinconsistencies.
Date
Msg-id 201DD0641B056142AC8C6645EC1B5F62014B961D89@SYD1217
Whole thread Raw
In response to Re: Proposal: Add more compile-time asserts to expose inconsistencies.  (Andres Freund <andres@anarazel.de>)
Responses Re: Proposal: Add more compile-time asserts to exposeinconsistencies.
List pgsql-hackers
From: Andres Freund <andres@anarazel.de> Sent: Sunday, 27 October 2019 12:03 PM

>>Ideally, the implementation should end up calling _Static_assert() 
>>somehow, so that we get the compiler's native error message.

OK. I can work on that.

>>We could do a configure check for whether _Static_assert() works at 
>>file scope.  I don't know what the support for that is, but it seems to 
>>work in gcc and clang

> I think it should work everywhere that has static assert. So we should need a separate configure check.

Er, that's a typo right? I think you meant: "So we *shouldn't* need a separate configure check"

Kind Regards
---
Peter Smith
Fujitsu Australia

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] Block level parallel vacuum
Next
From: Andres Freund
Date:
Subject: Re: Proposal: Add more compile-time asserts to exposeinconsistencies.