Author Topic: catch of multi-line compiler messages  (Read 2995 times)

Offline darmar

  • Multiple posting newcomer
  • *
  • Posts: 39
catch of multi-line compiler messages
« on: May 09, 2015, 06:51:52 am »
Most of messages from GNU Fortran compiler are multi-line, e.g.:
Code: [Select]
/home/darius/Other/test_f1/main.f90:17.12:
    implicit non e
            1
Error: Syntax error in IMPLICIT statement at (1)

I can't find a way to catch such messages properly with the current implementation of compiler framework.
Therefore I added few small changes which enables catching such messages.

Maybe somebody could review this patch?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9949
Re: catch of multi-line compiler messages
« Reply #1 on: May 09, 2015, 09:51:44 am »
Interesting. Most new compilers (gcc, clang) produce similar multiline messages, so this patch might be useful for them. :)
I'll take a look.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline darmar

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: catch of multi-line compiler messages
« Reply #2 on: May 18, 2015, 06:30:16 am »
Here I am sending just a bit modified version of the same patch.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9949
Re: catch of multi-line compiler messages
« Reply #3 on: May 19, 2015, 10:36:46 pm »
Can you show a screenshot with the results?
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline darmar

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: catch of multi-line compiler messages
« Reply #4 on: May 20, 2015, 02:32:41 pm »
The screenshots with added comments are attached.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9414
Re: catch of multi-line compiler messages
« Reply #5 on: May 25, 2015, 09:17:39 am »
This is a good one and something that annoyed me,too. Is this still being monitored? Otherwise I would catch it up...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9949
Re: catch of multi-line compiler messages
« Reply #6 on: May 25, 2015, 09:37:27 am »
I've just applied it in my home install, but I'm not sure I can apply the same modifications to gcc or clang compilers.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9949
Re: catch of multi-line compiler messages
« Reply #7 on: June 05, 2015, 10:24:45 pm »
@Morten: Have you tried this patch? Do you think it is fine to commit it?
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9414
Re: catch of multi-line compiler messages
« Reply #8 on: June 07, 2015, 04:21:40 pm »
@Morten: Have you tried this patch? Do you think it is fine to commit it?
I tried it, but as I am on Windows I have no experience with compilers other than GCC and VC.

It is enabled for Fortran only but should work just fine for any other GCC. For now, I see no reason not to commit it. However, before enabling it for (C/C++...) GCC or even VC we need more testing.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 9949
Re: catch of multi-line compiler messages
« Reply #9 on: September 26, 2015, 11:16:17 pm »
In svn, but I'm not sure if we can use this for gcc/clang messages.

Generally we should improve the error/warning handling with clang/gcc, because we're doing it sub-optimally.
We don't show the hints in the build messages, nor do we place the cursor a the correct column.
« Last Edit: September 26, 2015, 11:19:25 pm by oBFusCATed »
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]