Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic -Werror=all ? I never opted for this switch ! (Read 1622 times)
Asmodyne
Newbies
*
Offline


Posts: 7
Location: Fr
Joined: Nov 1st, 2019
-Werror=all ? I never opted for this switch !
Oct 9th, 2022 at 1:31am
Print Post  
Hello there !

This weekend, I dusted a large ESP32 VM project I've been working on this year. 
It has been working fine on the last time I closed the solution, in early july 2022.

But yesterday, 8th of october 2022, I encounter some weird behavior of the compiler : it was behaving as if -Wall & -Werror=all had been turned on !  Shocked

As in...
GDEH029Z13.cpp: 364:14: error: unused variable 'len' [-Werror=unused-variable]
-"Come on, I'd usually expect this as a simple warning !"  I said to myself.

To I checked all files contained in the _vm folder, along with the .vcxproj files (eithier vcxproj, .vcxproj.filters or vcxproj.user).
And there it was: a collection of "-Wno-Error=xxx",  "-Wall" "-WExtras" the monstrous "-Werror=all" flags in those project and config files ! 

That's new ! Those aren't the errors I was expecting to get ( some of my classes weren't fully implemented, I was hoping for some syntax errors from a TODO or some missing declarations, but not some strictly-conformed ISO enforcement !  Undecided

Since I've turned versioning on for my projects folders (I mean file versioning, the MS Windows' feature), I still can retrieve the July versions of those same folders, but were are those compilation switches coming from ? 

Factually, no one tech savvy enough has access to my workstation (since I'm teleworking), and those projects aren't published on any version control system (it's all on a detached machine, those are private projects).

Any ideas about this sudden change ? Can Visual Micro encounter spurious default change when updating it ?   Undecided

I'm at a loss.

Thanks for any help.
  
Back to top
 
IP Logged
 
Asmodyne
Newbies
*
Offline


Posts: 7
Location: Fr
Joined: Nov 1st, 2019
Re: -Werror=all ? I never opted for this switch !
Reply #1 - Oct 9th, 2022 at 1:32am
Print Post  
The output of my latest build attempt.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: -Werror=all ? I never opted for this switch !
Reply #2 - Oct 9th, 2022 at 2:06pm
Print Post  
If you turn off the vMicro > Compiler > Warnings for Project it will remove the -Wall -Werror=all from the project compilation.
  
Back to top
IP Logged
 
Asmodyne
Newbies
*
Offline


Posts: 7
Location: Fr
Joined: Nov 1st, 2019
Re: -Werror=all ? I never opted for this switch !
Reply #3 - Oct 9th, 2022 at 10:22pm
Print Post  
Simon@Visual Micro wrote on Oct 9th, 2022 at 2:06pm:
If you turn off the vMicro > Compiler > Warnings for Project it will remove the -Wall -Werror=all from the project compilation.



Ah.... This indeed works, thanks. But why the "-Werror=all" ? 

I expected this : disabling the option would disable warning. Not enabling it would turn all warning on and enforces them as errors.  Undecided
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: -Werror=all ? I never opted for this switch !
Reply #4 - Oct 10th, 2022 at 9:13am
Print Post  
The compiler flags added when warnings are enabled are determined by the board package in use, which are specified by "compiler.warning_flags.more" in platform.txt.

You can specify your own flags separate to these options using the vMicro > Project Properties, Configuration Extra Flags (which can be for all code, or specific to core/libraries/project).
  
Back to top
IP Logged
 
Asmodyne
Newbies
*
Offline


Posts: 7
Location: Fr
Joined: Nov 1st, 2019
Re: -Werror=all ? I never opted for this switch !
Reply #5 - Oct 10th, 2022 at 1:39pm
Print Post  
So it's a change in the ESP32 arduino core package. 

Thanks again !
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint