All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] might be bug report, breaking up of a comment
@ 2018-02-17 20:53 Robert Larice
  2018-02-17 21:44 ` Julia Lawall
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Larice @ 2018-02-17 20:53 UTC (permalink / raw)
  To: cocci

Hello,

  attached is a small example which seems to
    break up a comment line,
    thus commenting out following lines.

  Please look at the "long reuse" line
    which will have an open comment when spatch is run,
    thus commenting out the following "struct line *options"

Best Regards,
  Robert Larice

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ex5.cocci
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20180217/689ecef7/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex5.c
Type: text/x-csrc
Size: 299 bytes
Desc: not available
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20180217/689ecef7/attachment.bin>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cocci] might be bug report, breaking up of a comment
  2018-02-17 20:53 [Cocci] might be bug report, breaking up of a comment Robert Larice
@ 2018-02-17 21:44 ` Julia Lawall
  2018-02-17 22:06   ` Robert Larice
  0 siblings, 1 reply; 6+ messages in thread
From: Julia Lawall @ 2018-02-17 21:44 UTC (permalink / raw)
  To: cocci



On Sat, 17 Feb 2018, Robert Larice wrote:

> Hello,
>
>   attached is a small example which seems to
>     break up a comment line,
>     thus commenting out following lines.
>
>   Please look at the "long reuse" line
>     which will have an open comment when spatch is run,
>     thus commenting out the following "struct line *options"

I also see this undesriable behavior.  Thanks for the report.

julia

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cocci] might be bug report, breaking up of a comment
  2018-02-17 21:44 ` Julia Lawall
@ 2018-02-17 22:06   ` Robert Larice
  2018-02-17 22:43     ` Julia Lawall
  2018-03-11 21:15     ` Julia Lawall
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Larice @ 2018-02-17 22:06 UTC (permalink / raw)
  To: cocci

Julia Lawall <julia.lawall@lip6.fr> writes:

> On Sat, 17 Feb 2018, Robert Larice wrote:
>
>> Hello,
>>
>>   attached is a small example which seems to
>>     break up a comment line,
>>     thus commenting out following lines.
>>
>>   Please look at the "long reuse" line
>>     which will have an open comment when spatch is run,
>>     thus commenting out the following "struct line *options"
>
> I also see this undesriable behavior.  Thanks for the report.
>
> julia

grepping a bit in the source code I found this:
  cpp_eat_until_nl
perhaps in the vicinity of the issue.

and there is this comment somewhere:

(* cpp recognize C comments, so when #define xx (yy) /* comment \n ... */
 * then he has already erased the /* comment. So:
 * - dont eat the start of the comment otherwise afterwards we are in the middle
 *   of a comment and so will problably get a parse error somewhere.
 * - have to recognize comments in cpp_eat_until_nl.
 *)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cocci] might be bug report, breaking up of a comment
  2018-02-17 22:06   ` Robert Larice
@ 2018-02-17 22:43     ` Julia Lawall
  2018-03-11 21:15     ` Julia Lawall
  1 sibling, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2018-02-17 22:43 UTC (permalink / raw)
  To: cocci



On Sat, 17 Feb 2018, Robert Larice wrote:

> Julia Lawall <julia.lawall@lip6.fr> writes:
>
> > On Sat, 17 Feb 2018, Robert Larice wrote:
> >
> >> Hello,
> >>
> >>   attached is a small example which seems to
> >>     break up a comment line,
> >>     thus commenting out following lines.
> >>
> >>   Please look at the "long reuse" line
> >>     which will have an open comment when spatch is run,
> >>     thus commenting out the following "struct line *options"
> >
> > I also see this undesriable behavior.  Thanks for the report.
> >
> > julia
>
> grepping a bit in the source code I found this:
>   cpp_eat_until_nl
> perhaps in the vicinity of the issue.
>
> and there is this comment somewhere:
>
> (* cpp recognize C comments, so when #define xx (yy) /* comment \n ... */
>  * then he has already erased the /* comment. So:
>  * - dont eat the start of the comment otherwise afterwards we are in the middle
>  *   of a comment and so will problably get a parse error somewhere.
>  * - have to recognize comments in cpp_eat_until_nl.
>  *)

Thanks for the help, but that's not it at all.  The problem is in the
function get_indent in the file parsing_c/unparse_c.ml.  I'll try to fix
it tomorrow.

julia

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cocci] might be bug report, breaking up of a comment
  2018-02-17 22:06   ` Robert Larice
  2018-02-17 22:43     ` Julia Lawall
@ 2018-03-11 21:15     ` Julia Lawall
  2018-03-12 17:12       ` Robert Larice
  1 sibling, 1 reply; 6+ messages in thread
From: Julia Lawall @ 2018-03-11 21:15 UTC (permalink / raw)
  To: cocci



On Sat, 17 Feb 2018, Robert Larice wrote:

> Julia Lawall <julia.lawall@lip6.fr> writes:
>
> > On Sat, 17 Feb 2018, Robert Larice wrote:
> >
> >> Hello,
> >>
> >>   attached is a small example which seems to
> >>     break up a comment line,
> >>     thus commenting out following lines.
> >>
> >>   Please look at the "long reuse" line
> >>     which will have an open comment when spatch is run,
> >>     thus commenting out the following "struct line *options"
> >
> > I also see this undesriable behavior.  Thanks for the report.
> >
> > julia
>
> grepping a bit in the source code I found this:
>   cpp_eat_until_nl
> perhaps in the vicinity of the issue.
>
> and there is this comment somewhere:
>
> (* cpp recognize C comments, so when #define xx (yy) /* comment \n ... */
>  * then he has already erased the /* comment. So:
>  * - dont eat the start of the comment otherwise afterwards we are in the middle
>  *   of a comment and so will problably get a parse error somewhere.
>  * - have to recognize comments in cpp_eat_until_nl.
>  *)

The problem is fixed now.

julia

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cocci] might be bug report, breaking up of a comment
  2018-03-11 21:15     ` Julia Lawall
@ 2018-03-12 17:12       ` Robert Larice
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Larice @ 2018-03-12 17:12 UTC (permalink / raw)
  To: cocci

Julia Lawall <julia.lawall@lip6.fr> writes:

> The problem is fixed now.
>
> julia

Thank You !

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-12 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-17 20:53 [Cocci] might be bug report, breaking up of a comment Robert Larice
2018-02-17 21:44 ` Julia Lawall
2018-02-17 22:06   ` Robert Larice
2018-02-17 22:43     ` Julia Lawall
2018-03-11 21:15     ` Julia Lawall
2018-03-12 17:12       ` Robert Larice

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.