On 21 January 2015 at 16:30, Richard Smith <[email protected]> wrote:
> On Tue, Jan 20, 2015 at 9:42 AM, David Majnemer
> <[email protected]> wrote:
>> I don't think this approach would handle things like:
>>
>> int pr22217_foo;
>> int *b = &pr22217_foo;
>> extern int pr22217_foo __asm__("pr22217_bar");
>
> I think we should either reject this code, or ignore the __asm__ with
> a warning. __asm__ is effectively an attribute, and we don't support
> adding attributes after we've seen the definition of an entity, for
> exactly this reason. For instance:
In here int is a tentative definition (C code).
It was also first noticed when building glibc, so it is both support
by gcc and used in at least one location.
I can add an error/warning for now. To be clear, you want to error/warn on
int pr22217_foo;
extern int pr22217_foo __asm__("pr22217_bar");
Even when pr22217_foo is not used in between the two lines?
Cheers,
Rafael
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits