summaryrefslogtreecommitdiff
path: root/m4/dpkg-compiler.m4
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-04-09 20:14:22 +0200
committerGuillem Jover <guillem@debian.org>2014-04-21 16:54:29 +0200
commit639786e29c72baf6b1f0b2ca1cada34df54d8dff (patch)
treee9e4781b297e45505fd35a635d575c3540cb571a /m4/dpkg-compiler.m4
parent09d43d4f21f6b70c0c1aff2711a1503d7ecf8a35 (diff)
downloaddpkg-639786e29c72baf6b1f0b2ca1cada34df54d8dff.tar.gz
build: Test for required compound literals
And clarify the comment on the designated initializers.
Diffstat (limited to 'm4/dpkg-compiler.m4')
-rw-r--r--m4/dpkg-compiler.m46
1 files changed, 5 insertions, 1 deletions
diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4
index f1c760bf5..84d78164e 100644
--- a/m4/dpkg-compiler.m4
+++ b/m4/dpkg-compiler.m4
@@ -125,9 +125,13 @@ AC_DEFUN([DPKG_TRY_C99],
[[
int rc;
- /* Compound initializers. */
+ /* Designated initializers. */
struct { int a, b; } foo = { .a = 1, .b = 2 };
+ /* Compound literals. */
+ struct point { int x, y; } p = (struct point){ .x = 0, .y = 1 };
+ p = (struct point){ .x = 2, .y = 4 };
+
/* Trailing comma in enum. */
enum { first, second, } quux;