r179139 - Improve the diagnostics of the number-reading preprocessor directives.
Michael Ilseman
milseman at apple.com
Tue Apr 9 18:19:41 PDT 2013
Oh, right. I'll do that. Thanks!
On Apr 9, 2013, at 6:18 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>
> On Apr 9, 2013, at 18:04 , Michael Ilseman <milseman at apple.com> wrote:
>
>> // Line markers are digit strings interpreted as decimal numbers, this is
>> // 10, not 8.
>> #line 010 // expected-warning {{#line directive interprets number as decimal, not octal}}
>> +# 010 // expected-warning {{GNU line marker directive interprets number as decimal, not octal}}
>> extern int array[__LINE__ == 10 ? 1:-1];
>
> Oops, and of course now I see the issue—the following line with __LINE__ is a poor man's static_assert, checking that the line marker actually did its job. Can you put that in for both kinds of directive?
>
> Jordan
More information about the cfe-commits
mailing list