Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: stahta01 on June 27, 2014, 08:10:47 pm

Title: Patch to Compiler RegEx file; fixes warning reported as error.
Post by: stahta01 on June 27, 2014, 08:10:47 pm
Affects the MinGW GCC compiler when option "-Wmissing-include-dirs" is used.
File: options_common_re.xml
String: cc1plus.exe: warning: .objs\include: No such file or directory [enabled by default]

Code
Index: src/plugins/compilergcc/resources/compilers/options_common_re.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/options_common_re.xml (revision 9838)
+++ src/plugins/compilergcc/resources/compilers/options_common_re.xml (working copy)
@@ -181,6 +181,12 @@
            msg="1">
         <![CDATA[.*cc.*:[ \t]([Uu]nrecognized.*option.*)]]>
     </RegEx>
+    <RegEx name="Compiler warning (3)"
+           type="warning"
+           msg="2"
+           file="1">
+        <![CDATA[cc.*:[ \t][Ww]arning:(.*):[ \t](.*)]]>
+    </RegEx>
     <RegEx name="No such file or directory"
            type="error"
            msg="2"

I am far from an expert on RegEx expressions and the Compiler Plugin; so, this patch needs tested.

Likely the easiest way to duplicate the issue is
1. Add -Wmissing-include-dirs
2. Delete folder .objs\include
3. Rebuild CB Target ConsoleRunner

Tim S.