Bug#157416: _Pragma() from macros - bug
Zack Weinberg wrote:-
> This was reported to the Debian bug-tracking system:
>
> $ cat foo.c
> _Pragma("foo"); int y;
> #define FOO _Pragma("foo"); int x;
> FOO
> aps100@cyclone:~$ cpp-3.2 foo.c
> # 1 "foo.c"
> # 1 "<built-in>"
> # 1 "<command line>"
> # 1 "foo.c"
>
> # 1 "foo.c"
> #pragma foo
> # 1 "foo.c"
> ; int y;
>
>
> # 3 "foo.c"
> #pragma ; int x;foo
>
> > The first line is expanded correctly; the third is not (rendering
> > _Pragma almost completely useless).
>
> Do you have time to look into this, Neil?
I'll try to have a look this weekend.
Neil.
Reply to: