Re: [PATCH v6 02/10] ss: created formatters for json and hr
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2015-09-09 21:30:38
2 messages, 2 authors, 2015-09-09 · open the first message on its own page
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2015-09-09 21:30:38
On Wed, 9 Sep 2015 19:43:13 +0000 Matthias Tafelmeier [off-list ref] wrote:
+#define STATIC_ASSERT(COND, MSG) \ +{ \ + char STATIC_ASSERT##MSG[(COND) ? 1 : -1]; \ + (void)STATIC_ASSERT##MSG[0]; \ +}
If you are going to introduce this, please use same convention as Linux kernel. ie. BUILD_BUG_ON() Your code looks like it came out of some other project.
From: Matthias Tafelmeier <hidden>
Date: 2015-09-09 22:00:50
quoted
+#define STATIC_ASSERT(COND, MSG) \ +{ \ + char STATIC_ASSERT##MSG[(COND) ? 1 : -1]; \ + (void)STATIC_ASSERT##MSG[0]; \ +}If you are going to introduce this, please use same convention as Linux kernel. ie. BUILD_BUG_ON() Your code looks like it came out of some other project.
Well, but when using "BUILD_BUG_ON()" I would have to give up on having put out the MSG by compiler when a static issue occurs. I liked that notion.