Skip to content

Conversation

leres
Copy link
Contributor

@leres leres commented Jun 16, 2024

FreeBSD bumped avr-gcc from 11.2.0_3 to 14.1.0 which is a bit more picky about union definitions:

In file included from /opt/arduino/libraries/IRremote/IRremote.hpp:278,
                 from /home/ice/u0/leres/src/sxmmodu/ir.cpp:34:
/opt/arduino/libraries/IRremote/LongUnion.h:90:7: error: declaration of 'LongUnion::<unnamed struct> LongUnion::WordUnion' changes meaning of 'WordUnion' [-Wchanges-meaning]
   90 |     } WordUnion;
      |       ^~~~~~~~~
/opt/arduino/libraries/IRremote/LongUnion.h:89:9: note: used here to mean 'union WordUnion'
   89 |         WordUnion HighWord;
      |         ^~~~~~~~~
/opt/arduino/libraries/IRremote/LongUnion.h:36:7: note: declared here
   36 | union WordUnion {
      |       ^~~~~~~~~
[...]

This PR makes minimal changes to get it to compile again.

In file included from /opt/arduino/libraries/IRremote/IRremote.hpp:278,
                 from /home/ice/u0/leres/src/sxmmodu/ir.cpp:34:
/opt/arduino/libraries/IRremote/LongUnion.h:90:7: error: declaration of 'LongUnion::<unnamed struct> LongUnion::WordUnion' changes meaning of 'WordUnion' [-Wchanges-meaning]
   90 |     } WordUnion;
      |       ^~~~~~~~~
/opt/arduino/libraries/IRremote/LongUnion.h:89:9: note: used here to mean 'union WordUnion'
   89 |         WordUnion HighWord;
      |         ^~~~~~~~~
/opt/arduino/libraries/IRremote/LongUnion.h:36:7: note: declared here
   36 | union WordUnion {
      |       ^~~~~~~~~
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Jun 16, 2024
Also deal with avr-gcc 14.1.0 fallout:

    Arduino-IRremote/Arduino-IRremote#1240

Changes since 4.3.1:

 - Added sendSonyMSB(unsigned long data, int nbits) as a clone of
   sendSony(unsigned long data, int nbits) to be more consistent.

 - Added sendSamsungMSB(unsigned long data, int nbits) as a clone
   of sendSAMSUNG(unsigned long data, int nbits) to be more consistent.

 - Added ESP32 core 3.x error message.

Reported by:    portscout
@ArminJo
Copy link
Collaborator

ArminJo commented Jun 16, 2024

Thanks for reporting. Is it OK when I use some other names and do not merge your PR?

@ArminJo ArminJo closed this in 8f23b6b Jun 16, 2024
@leres
Copy link
Contributor Author

leres commented Jun 16, 2024

Thanks for reporting. Is it OK when I use some other names and do not merge your PR?

Of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants