Author Topic: Patch to Compiler RegEx file; fixes warning reported as error.  (Read 4521 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7070
    • My Best Post
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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org