On Mon, Mar 23, 2020 at 12:22:48AM -0400, Tom Lane wrote:
> Yeah, the comment needs an update; but if we have four implementations
> then it ought to describe each of them, IMO.

I got an idea as per the attached.  Perhaps you have a better idea?
--
Michael
diff --git a/src/include/c.h b/src/include/c.h
index 831c89f473..6731861da5 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -836,9 +836,13 @@ extern void ExceptionalCondition(const char *conditionName,
  * The macro StaticAssertDecl() is suitable for use at file scope (outside of
  * any function).
  *
- * Otherwise we fall back on a kluge that assumes the compiler will complain
- * about a negative width for a struct bit-field.  This will not include a
- * helpful error message, but it beats not getting an error at all.
+ * On recent C++ compilers, we can use standard static_assert() for all
+ * types of static assertions.
+ *
+ * Otherwise, for the C and C++ fallback implementations, we fall back on
+ * a kluge that assumes the compiler will complain about a negative width
+ * for a struct bit-field.  This will not include a helpful error message,
+ * but it beats not getting an error at all.
  */
 #ifndef __cplusplus
 #ifdef HAVE__STATIC_ASSERT

Attachment: signature.asc
Description: PGP signature

Reply via email to