-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2.8.3 does not compile anymore with gcc 4.8.2 (used by Tasmota for ESP8266) #1880
Comments
@tonhuisman Please have a look, i think EspEasy will fail to compile too. |
Best solution would be to upgrade the gcc version, but I assume that's not an option, probably related to the Arduino framework version in use. (same problem at ESPEasy). Simplest alternative is to add a test if I can add a different macro
This 'avoids' removing the not available protocols from the protocol-list, and also the check if a protocol is not available, but I assume that is currently only used in ESPEasy, as I designed it for use there. |
This would be a good solution. If I understand well, ESP8266 will have the same behavior as before, while ESP32 (with gcc8) will have better features. I'm not aware of the protocol-list. What is it? |
There is a function to fetch all supported protocols. After using the change I made, it will return |
I think I've fixed it (see linked PR), with the side-note/limitation that the list of protocols contains all names, even when not included, but only for older compilers that don't support the NB: This feature was introduced to reduce code-size as much as possible. |
Thanks a lot. I confirm it's compiling fine on both esp8266 and esp32 |
Add check to see if `__VA_OPT__` macro is supported, if not, applies `<true_result>` value for `COND()` macro by default. This has the side-effect/limitation that all protocol names are included in the build, even if the protocol is not available in the code, but _only_ for compilers dat do _not_ support the `__VA_OPT__` macro, notably gcc 4.8.2 (and older). Resolves #1880
v2.8.4 has been released which contains the fix. |
Version/revision of the library used
v2.8.3
Describe the bug
Tasmota uses gcc 4.8.2 for ESP8266 which does not support
__VA_OPT__
extension.Is there a way to rewrite the
COND(<define_to_test>[||/&&<more_define>...], <true_result>, <false_result>)
macro without__VA_OPT__
?Below is the first compilation error resported (there are many afterwards):
To Reproduce
Compilation error with gcc 4.8.2
Example code used
Expected behaviour
Output of raw data from [IRrecvDumpV2.ino]
What brand/model IR demodulator are you using?
Circuit diagram and hardware used (if applicable)
I have followed the steps in the [Troubleshooting Guide]
Has this library/code previously worked as expected for you?
Yes, 2.8.2 compiled fine
Other useful information
The text was updated successfully, but these errors were encountered: