aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index 1ec95228..687c8c0c 100644
--- a/parse.c
+++ b/parse.c
@@ -2783,6 +2783,13 @@ static struct token *initializer_list(struct expression_list **list, struct toke
{
struct expression *expr;
+ // '{ 0 }' is equivalent to '{ }' unless wanting all possible
+ // warnings about using '0' to initialize a null-pointer.
+ if (!Wuniversal_initializer) {
+ if (match_token_zero(token) && match_op(token->next, '}'))
+ token = token->next;
+ }
+
for (;;) {
token = single_initializer(&expr, token);
if (!expr)