make grokfield handle locations

Aldy Hernandez aldyh@redhat.com
Tue Aug 19 15:59:00 GMT 2008


> > struct { int x; int; } a; /* { dg-warning "does not declare anything" }
> >                    ^^^^ this is the correct location.
> 
> I hope you do not mean the four characters "; } " are the correct 

No, sorry.  What I meant was:

    struct { int x; int; } a; /* { dg-warning "does not declare anything" }
                       ^ this is the correct location.

I guess we could use the beginning of the int:

    struct { int x; int; } a; /* { dg-warning "does not declare anything" }
                    ^

But I believe my first location is obvious enough.

> >         struct { int x; int; } a;
> >                            /* { dg-warning "does not declare anything" }
> 
> That seems highly incompatible.  Instead, for now I advise modifying 
> testcases to move the single token in question onto its own line so 
> diagnostics can be tested to be associated with it.

Can we talk about how best to fix the dg/ machinery?  I don't mind
fixing it once and for all.  I'd like something that's intuitive and
easy for folks to use, but obviously, what I thought was intuitive is not,
so I'm open for suggestions.



More information about the Gcc-patches mailing list