Closed
Description
Basic Infos
The esp8266 toolkit uses gcc 4.8.2 an thus it fails to parse a multiline raw String when it is passed as an argument to a macro. The same sketch as below will build without errors when using the original Arduino toolkit (when switching to AVR / Arduino Hardware in the Arduino IDE).
This was fixed in gcc 4.9 :
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57824
Sketch
#include <Arduino.h>
#define S(s) s
const char y[] = S(R"(
abc
)");
void setup() {
}
void loop() {
}
Error Message
sketch_jun13a:3: error: unterminated raw string
const char y[] = S(R"(
^
exit status 1
unterminated raw string
Resolution?
Is there a reason on why you are using the 4.8.2 version of gcc? Max Filippov seems to provide newer versions on https://github.com/jcmvbkbc/linux-xtensa
So would it be possible to use a newer gcc version? Or would one have to "backfix" the old gcc for some reason?