[cfe-dev] GSL compiles pretty much

Chris Lattner clattner at apple.com
Sun Jun 29 22:43:17 PDT 2008


On Jun 29, 2008, at 10:12 PM, Kelly Wilson wrote:
> Thanks for the reply Eli,
>
> On Sun, Jun 29, 2008 at 1:01 AM, Kelly Wilson <wilsonkk at shaw.ca>  
> wrote:
>>> There are some errors in landau.c (known clang error
>>> in constants.c for the lexer)
>
>> What's the bug number in Bugzilla?
>
> There is no bug number that I am aware of, but the file
> ../llvm/tools/clang/test/Lexer/constants.c says:
>
> /*RUN clang -fsyntax-only -verify %s
> */
>
> int x = 000000080; /* expected error {{invalid digit}} */
>
>
> and this is exactly the error that pops up in landau.c.

Does the code compile with GCC?  That's an octal number, not decimal.   
GCC and clang both correctly reject this:

$ gcc t.c
t.c:1:9: error: invalid digit "8" in octal constant
$ clang t.c
t.c:1:16: error: invalid digit '8' in octal constant
int x = 000000080;
                ^

-Chris



More information about the cfe-dev mailing list