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]

Re: [Patch, fortran, RFC] Add warning for missing location information


Le 08/12/2016 à 22:50, Thomas Koenig a écrit :
Am 08.12.2016 um 21:01 schrieb Mikael Morin:
Le 08/12/2016 à 20:26, Thomas Koenig a écrit :
Hi Andre,

Thomas, your part of the patch looks ok to me, too. I haven't tracked
the
discussion on whether it is ok to add your part of the patch.
Therefore I don't
have committed your patch. My opinion is, that it does do no harm. So
it should
be applied.

Based on the feedback so far, I will this apply during the weekend
after another regression test unless somebody objects.


Hello,

I have one comment.

This error;
+    gfc_warning_internal (0, "No location in statement statement");

is not very helpful, especially without location.

Could you at least provide the statement type? There is
gfc_ascii_statement you can use for that.

gfc_ascii_statement works with gfc_statement only,
here, we are dealing with gfc_exec_op.

Of course. :-(

What I could do is to add a gfc_debug_code function to
dump-parse-tree and add a comment that, if this part of
the code is encountered, you should examine the expression
using that particular function call using a debugger.

Of course, I could also just dump the statement to stderr,
but somehow that does not quite conform to all the elegang
error handling infrastructure in gcc :-)

Yes, please don’t do that.

So, what do people think?

As the code is disabled for releases anyway, I don’t mind the patch getting in as is. So OK from my side.


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