Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Compiler Framework Redesign => Topic started by: darmar on May 09, 2015, 06:51:52 am

Title: catch of multi-line compiler messages
Post by: darmar on May 09, 2015, 06:51:52 am
Most of messages from GNU Fortran compiler are multi-line, e.g.:
Code
/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?
Title: Re: catch of multi-line compiler messages
Post by: oBFusCATed 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.
Title: Re: catch of multi-line compiler messages
Post by: darmar on May 18, 2015, 06:30:16 am
Here I am sending just a bit modified version of the same patch.
Title: Re: catch of multi-line compiler messages
Post by: oBFusCATed on May 19, 2015, 10:36:46 pm
Can you show a screenshot with the results?
Title: Re: catch of multi-line compiler messages
Post by: darmar on May 20, 2015, 02:32:41 pm
The screenshots with added comments are attached.
Title: Re: catch of multi-line compiler messages
Post by: MortenMacFly 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...
Title: Re: catch of multi-line compiler messages
Post by: oBFusCATed 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.
Title: Re: catch of multi-line compiler messages
Post by: oBFusCATed on June 05, 2015, 10:24:45 pm
@Morten: Have you tried this patch? Do you think it is fine to commit it?
Title: Re: catch of multi-line compiler messages
Post by: MortenMacFly 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.
Title: Re: catch of multi-line compiler messages
Post by: oBFusCATed 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.