[cfe-commits] r65678 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.def lib/Sema/Sema.h lib/Sema/SemaDecl.cpp test/Sema/scope-check.c
Neil Booth
neil at daikokuya.co.uk
Sat Feb 28 04:01:55 PST 2009
Eli Friedman wrote:-
> +// RUN: clang -fsyntax-only -verify %s
> +
> +int test1(int x) {
> + goto L; // expected-error{{illegal jump}}
> + int a[x];
> + L:
> + return sizeof a;
> +}
It would be nice to mention the thing(s) forming the scoping
violation; e.g. for my fe:
$ ./cfe /tmp/bug.c
"/tmp/bug.c", line 2: error: branching bypasses declaration of
variable-length array "a" at line 3
goto L; // expected-error{{illegal jump}}
^
"/tmp/bug.c", line 3: warning: variable "a" declared but not used
int a[x];
^
1 error found compiling "/tmp/bug.c".
Neil.
More information about the cfe-commits
mailing list