News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

catch of multi-line compiler messages

Started by darmar, May 09, 2015, 06:51:52 AM

Previous topic - Next topic

darmar

Most of messages from GNU Fortran compiler are multi-line, e.g.:
/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?

oBFusCATed

Interesting. Most new compilers (gcc, clang) produce similar multiline messages, so this patch might be useful for them. :)
I'll take a look.
(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!]

darmar

Here I am sending just a bit modified version of the same patch.

oBFusCATed

Can you show a screenshot with the results?
(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!]

darmar

The screenshots with added comments are attached.

MortenMacFly

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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

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.
(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!]

oBFusCATed

@Morten: Have you tried this patch? Do you think it is fine to commit it?
(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!]

MortenMacFly

Quote from: oBFusCATed on June 05, 2015, 10:24:45 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

#9
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.
(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!]