Community
Participate
Working Groups
Build Identifier: In my projects toplevel folder I enabled warnings (-pedantic, -pedantic-errors, -wall, -werror). In a subfolder (containing code generated by gsoap that throws warnings) I disabled all warnings. The compiler still uses the warnings for all files in all subfolders. The only chance I have to get the stuff compiled is disabling all warnings for the WHOLE project. it is not possible to disable warnings for the subfolder. (And somehow I have the feeling that this worked throughout the whole day but no doesn't work anymore.) Note: I did NOT accidentially modify an inactive build target. I modified ALL build targets. Note: When I only compile one single file in the folder, the correct settings (no warnings) are applied for this file. Only when I compile everything, the wrong settings (settings of the toplevel folder with warnings) are applied. Reproducible: Always Steps to Reproduce: 1. Create a managed hello world project 2. Enable warnings (-pedantic, -pedantic-errors, -wall, -werror) 3. Create a folder, create a class, create a method "op", call th method "op" from main. 4. In the new folder disable all warnings - on folder level. 5. In the method "op" enforce a warning. (In my case: if(something) if(something else) blabla else blabla 6. Compile only the single file in the folder. This is successful because no warnings (and no warning as error) is applied. 7. Compile everything: The file in the foder is compiled with warnings enabled. (I double-checked this. At least on my system the behavior is this way. However, I have the feeling - as I said - that this morning everything was ok. Restarting eclipse, pressing F5 etc. did not work out.) Thank you, Roelof Berg (I have a screenshot as an evidence/proof - in case you can't believe this :)
Created attachment 185077 [details] Screenshot Screenshot of the behavior I don't expect. You see the build-cmd-line of the folder above. Below you see the last build-shell. In the build-shell one can see different g++-cmdline-options than one sees in the folder-properties-dialog above.
Created attachment 185081 [details] Generated .mk folder makefile Generated makefile looks ok. But in the eclipse command line output I see -pedantig again (allthough this option is NOT in the generated makefile): Building file: ../src/generated_code/soap/soapC.cpp Invoking: GCC C++ Compiler g++ -O0 -g3 -pedantic -pedantic-errors -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"src/generated_code/soap/soapC.d" -MT"src/generated_code/soap/soapC.d" -o"src/generated_code/soap/soapC.o" "../src/generated_code/soap/soapC.cpp" cc1plus: warnings being treated as errors ../src/generated_code/soap/soapC.cpp: In function ‘std::string* soap_in_std__string(soap*, const char*, std::string*, const char*)’: ../src/generated_code/soap/soapC.cpp:616: error: suggest explicit braces to avoid ambiguous ‘else’ As if the makefile would not be applied. Could this be related to the ".." in the filepath ? (However, I wonder where the ".." comes from ...)
============================== Status-Request: Closed/Invalid ============================== Hi, I still wonder about my posted screenshot. However, I #included generated code (from the folder with warnings DISabled) to handwritten-code (that folder has warnings ENabled). So what happens: When compiling the handwritten-code-files, the generated-code is included and also compiled "pedantic-as-error". So I shouldn't wonder about compile-errors then, right :) Ok, besides the fact that I still wonder about the attached screenshot, chances are very good that there's no bug. (Just user stupidity ;) Sorry, I hope no one wasted effort for bug hunting, Roelof