This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, 22 Aug 2008, Aldy Hernandez wrote: > Joseph (and Jason), I would like your input on this before I go on. I > am committed to fixing the location information throughout the compiler. > And though I know you like to have everything fixed in one go, I work > better with an incremental approach. I sincerely hope you can > accomodate this. > > I am going through tests in dg.exp and verifying that we have the > correct column information. I'd like to fix as I go. > > With this initial patch I noticed that to come up with suitable tests > for all this, I would have to basically write an entire ISO C > comformance test, something which is perhaps beyond the scope of my > work. I would like to fix existing tests as I go, and perhaps add new > ones when it is obvious how to add new tests. Sometimes I noticed it > was incredibly hard to contrive a test for a particular location we were > setting. I hope we can come to a middle ground here-- I doubt I have > the time, desire, or inclination to write an entire comformance suite. The C parts of the patch are OK. In general, I think the patch changing a diagnostic that relies on the implicit input_location to take a more specific location is probably the patch that should have an assertion in the testsuite about exactly what (including column) that location is; for patches such as this that set locations it's not at all clear what the relevant diagnostics, if any, are. When I was expanding test coverage for C front-end diagnostics to avoid the new C parser breaking untested areas of the compiler, I used a script to identify messages present in a newly generated gcc.pot but not in gcc.log from a testsuite run; this is attached. It's obviously not quite what you want for this work, but should illustrate how, given a message from the compiler, to find testcases that exercise that message so you know what tests to modify to add column number tests for a particular message. -- Joseph S. Myers joseph@codesourcery.com
Attachment:
pot2msgs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |