Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343186

Summary: "CDT Internal Builder" cannot detect build error
Product: [Tools] CDT Reporter: Mary Ann <mnazario>
Component: cdt-buildAssignee: cdt-build-inbox <cdt-build-inbox>
Status: RESOLVED DUPLICATE QA Contact: Andrew Gvozdev <angvoz.dev>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Mary Ann CLA 2011-04-18 14:07:07 EDT
Build Identifier: 20100617-1415

When using the "CDT Internal Builder", certain build errors are reported in the Console window but not registered in the Problems window.

Reproducible: Always

Steps to Reproduce:
1. Create a new Hello World ANSI C project. Select Linux GCC as tool chain.

2. Set the project's "Current Builder" to "CDT Internal Builder". 

3. Insert an invalid compiler flag: Go to project's Tool Settings > GCC C Compiler > Miscellaneous. Under 'Other flags', append the " -D".

4. Build the project.

4a. Notice that the build failed. The Console window reports:

**** Internal Builder is used for build               ****
gcc -O0 -g3 -Wall -c -fmessage-length=0 -D -osrc/hello6.o ../src/hello6.c
<command-line>: error: macro names must be identifiers
Build error occurred, build is stopped
Time consumed: 71  ms. 

4b. However, the "Problems" window does not report this. If you have automated the detection of build errors, you will not be able to know that the build failed.

5. Change the builder to something else, e.g. Gnu Make Builder. You will see that the error is reported in both the Console & Problems windows.
Comment 1 Andrew Gvozdev CLA 2011-04-18 18:14:12 EDT
Works for me on the HEAD. I am pretty sure it was the fix of bug 327921 that did it. You can try latest CDT 8.0 from http://download.eclipse.org/tools/cdt/builds/ to verify.

*** This bug has been marked as a duplicate of bug 327921 ***
Comment 2 Andrew Gvozdev CLA 2011-04-18 18:23:02 EDT
Actually the fix went to CDT 7.0.2 - you can just upgrade to any 7.0.2 build.