AVR-GCC warning extra tokens at end of #undef in porthardware.h

I tried to reproduce your warnings as quickly as possible but was not able to. This could be because of a few things…

  1. I could have a different demo setup than you. This would probably be the most obvious problem. I tried to use the demo documented here
  2. I could be on a newer version of AVR-GCC. Atmel studio has been replaced with Microchip Studio. I used this and while I’m not sure there are meaningful differences (both are version 7 and heck - the installer even has Atmel abbreviations) I can’t rule it out.

Regardless - your post made me find out our current AVR demos are broken. I’ll be working on patching them. It appears our repo restructure for 3p ports caused an issue.


As for your issue - I looked at this online page but didn’t find a mentioned compiler option to suppress the extra token warning. However, other compilers like Clang have a -Wno-extra-tokens option. Could you try this when you compile?