Likely the last big bug in C area

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Likely the last big bug in C area

Abramo Bagnara-2

I think we have a bug in clang that should be fixed before 2.7.

According to C99 6.2.1p4 the scope of tag declarations, when embedded in
a declarator inside a function parameter list, should be the function
block (this is not true for C++: see 3.3.1p5).

This means that:

void f(struct s *x) {
  struct s { int f; } *y = x;
}

should be legal according to C99 but not legal according to C++.

Clang currently believes that this code is not legal for both.

The bug has already been inserted in bugzilla:

http://llvm.org/bugs/show_bug.cgi?id=6298

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev