diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-11-30 01:00:34 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-01 02:15:21 +0100 |
| commit | a0f34e0fd2a44016ef668e19187a342c5f4edf45 (patch) | |
| tree | 2d093ada46ae6aaf57a79b5cd15f3d0f329d73c4 /cgcc | |
| parent | eb35b2e8aa79552fe0ccd7a4e7a7753b230cbdd4 (diff) | |
| download | sparse-dev-a0f34e0fd2a44016ef668e19187a342c5f4edf45.tar.gz | |
Accept comma-separated list for function declarations.
The declaration of a function without prototype is currently
silently accepted by sparse but a warning is issued for
'old-style' declarations:
... warning: non-ANSI function declaration ...
However, the difference between these two cases is made by
checking if a ';' directly follow the parentheses. So:
int foo();
is silently accepted, while a warning is issued for:
int foo(a) int a;
but also for:
int foo(), bar();
This last case, while unusual, is not less ANSI than a simple
'int foo();'. It's just detected so because there is no ';'
directly after the first '()'.
Fix this by also using ',' to detect the end of function
declarations and their ANSIness.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'cgcc')
0 files changed, 0 insertions, 0 deletions
