diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-06-01 23:23:54 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-06-03 13:17:35 +0200 |
| commit | 3800353ba503dc700ee3803a6fa4729f03e702ff (patch) | |
| tree | 2d2f5dfef589d43712460d92cf7f883eb4cd81c4 /compat-linux.c | |
| parent | 0ee050a84a2986193060a7cf2241e993fbfc4f30 (diff) | |
| download | sparse-dev-3800353ba503dc700ee3803a6fa4729f03e702ff.tar.gz | |
univ-init: scalar initializer needs some additional checks
Currently, -Wno-universal-initializer is simply implemented
by simply replacing '{ 0 }' by '{ }'.
However, this is a bit too simple when it concerns scalars
initialized with '{ 0 }' because:
* sparse & GCC issued warnings for empty scalar initializers
* initializing a pointer with '{ }' is extra bad.
So, restore the old behaviour for scalar initializers.
This is done by leaving '{ 0 }' as-is at parse time and changing
it as '{ }' only at evaluation time for compound initializers.
Fixes: 537e3e2daebd37d69447e65535fc94e82b38fc18
Thanks-to: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'compat-linux.c')
0 files changed, 0 insertions, 0 deletions
