[cfe-commits] Inconsistent behavior with variable shadow

Joerg Sonnenberger joerg at britannica.bec.de
Tue Jun 19 08:31:38 PDT 2012


Hi all,
consider the following input:

void fn1 () { int it; for (;;) long it; }

void fn2 () { for (int it;;) long it; }

GCC accepts both. Clang rejects fn2, but by default silently accepts
fn1. Is there a good reason for that mismatch?

Joerg



More information about the cfe-commits mailing list