NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/45666: lint(1) wrong 'syntax error' message
>Number: 45666
>Category: bin
>Synopsis: lint(1) wrong 'syntax error' message
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 28 08:15:00 +0000 2011
>Originator: Nicolas Joly
>Release: NetBSD 5.99.57
>Organization:
Insitut Pasteur
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 5.99.57 NetBSD 5.99.57 (LANFEUST) #3:
Sun Nov 27 10:59:21 CET 2011
njoly%lanfeust.sis.pasteur.fr@localhost:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/LANFEUST
amd64
Architecture: x86_64
Machine: amd64
>Description:
lint(1) generate a wrong 'syntax error' message when a variable declaration,
from a previous typedef, is used after a statement (C9X mode).
njoly@petaure [~]> cat sample.c
typedef int int_t;
int main() {
int i = 0; i+= 1;
int_t j = 0; j += 1;
return 0; }
njoly@petaure [~]> lint -Sw sample.c
sample.c:
sample.c(4): syntax error 'j' [249]
sample.c(4): j undefined [99]
The problem goes away if using some basic type (int) for j.
>How-To-Repeat:
Run lint on previous testcase.
>Fix:
Home |
Main Index |
Thread Index |
Old Index