[cfe-dev] implicit int rule for c89
James Dennett
james.dennett at gmail.com
Sun Dec 14 22:31:58 PST 2014
On Sun, Dec 14, 2014 at 10:21 PM, Rong, Hongbo <hongbo.rong at intel.com>
wrote:
>
> b.c:
>
> int main() {
>
> a = 1;
>
> return a;
>
> }
>
>
>
> clang.exe -std=c89 b.c
>
> b.c:2:3: error: use of undeclared identifier 'a'
>
> a = 1;
>
> ^
>
> b.c:3:10: error: use of undeclared identifier 'a'
>
> return a;
>
> ^
>
> 2 errors generated.
>
>
>
> For c89, why variable a is not made as an implicit int?
>
>
>
Because that's not what C89 says. "implicit int" was for functions, not
variables.
-- James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141214/437e364f/attachment.html>
More information about the cfe-dev
mailing list