[PATCH] D33676: Place implictly declared functions at block scope

Momchil Velikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 30 08:54:16 PDT 2017


chill added a comment.

In https://reviews.llvm.org/D33676#767746, @rogfer01 wrote:

> I understand that the scope `S` in this case is a (function) prototype scope so it would not be the innermost block scope, would it? That said, GCC does not accept `p_ok` above so probably this behaviour is sensible, after all in C99 this is an extension.


I actually missed the possibility of a function call expression to appear in such a context. I also think that GCC (and Clang) should accept the `p_ok` initializer, as they do if one adds `extern int call_to_undeclared();` at the beginning of the block.


https://reviews.llvm.org/D33676





More information about the cfe-commits mailing list