It's been several months since I have a compilation error on when I want to change the value of an enumeration declared at the beginning of the program (global), in a function that replaces it with an integer.
Before I did not have this problem, but having switched my code from a mini arduino card, to ESP8266 the problem appeared .. It do not have the same compiler ??
The error below is still blocking and prevents me from advancing on my project .. I can not find the solution:
ERROR : request for member 'state' in 'CYCLE_ARROSAGE', which is of non-class type '<anonymous enum>'
Using IDE 1.8.5 the example code compiles if you add the missing '}' at the end of the source. It does not give the error message you quote. It just gives the warning
44:20: warning: invalid conversion from 'int' to '<anonymous enum>' [-fpermissive]
CYCLE_ARROSAGE = NouveauCycle; // -> ERROR
But I don't understand what the code is trying to do.
stowite:
Using IDE 1.8.5 the example code compiles if you add the missing '}' at the end of the source. It does not give the error message you quote. It just gives the warning
44:20: warning: invalid conversion from 'int' to '<anonymous enum>' [-fpermissive]
CYCLE_ARROSAGE = NouveauCycle; // -> ERROR
When you see a warning accompanied with >:( >:( >:( -fpermissive >:( >:( >:( it is really an error.
(That >:( thing was added to default compiler options in the AVR core after GCC was updated to newer version that has stricter error checking and a number of libraries failed to compile.)