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]

Re: warning: multi-line comment (why?)


Jamie Lokier wrote:-

> Neal, you're right my loop was broken with /\<newline>/.  Please find
> attached one patch and one test case.  I don't have Dejagnu installed
> but I've formatted the test case that way so you can give it a try.

Hmm, you didn't read my mail did you? :-) You've not really fixed it,
and made it hard work.  What if there's two escaped newlines in a row?
Or if there's a trigraphed backslash?  get_effective_char handles all
that for you, rather than you checking the result of a buffer->cur++.

To be consistent we should also whitespace-skip \v and \f.  No special
tab handling is needed - it's only there to keep track of columns for
warnings, and since we're a line comment there are not going to be any
warnings on the line (trigraph warnings are now turned off).
is_nvspace does all that for you.

> If you like the patch I'll need to send in the copyright assignment
> form.

I'll do it myself properly soon, and that'll solve the copyright
problem.  I'll cc you when I do.  I think we can use your test case
without problems.

Thanks,

Neil.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]