Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Compiler Bug (Read 1735 times)
Veliferums
Newbies
*
Offline


Posts: 8
Joined: Aug 20th, 2023
Compiler Bug
Sep 13th, 2023 at 2:23pm
Print Post  
static const char PROGMEM P1[] = 
"Hello"
"World"; gives => "HelloWorld"

static const char PROGMEM P2[] ="\
Hello\
World"; gives => " Hello World"

The two arrays are in a header file, when I use them in my main cpp file they work both ok (In PlatFormIO it works ok)
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Compiler Bug
Reply #1 - Sep 13th, 2023 at 2:40pm
Print Post  
Can you clarify, does this not work as expected in vMicro? (your post says it works in both vMicro and PIO?)

Also please attach the logs requested at the top of the page so we can understand the environment correctly.
  
Back to top
IP Logged
 
Veliferums
Newbies
*
Offline


Posts: 8
Joined: Aug 20th, 2023
Re: Compiler Bug
Reply #2 - Sep 13th, 2023 at 5:17pm
Print Post  
In PlatformIO it works correct in both header or cpp file.
In VMicro the version with the "\" only works correct in a cpp file but not in a header file. In the header file the "\" is converted to a SPACE and not as it is intended to only escape the linefeed. You can see in the example that the version with the backslash has a space in front of "HeloWorld"and in the middle.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Bug
Reply #3 - Sep 13th, 2023 at 5:41pm
Print Post  
Please follow the guide in yellow above

Thanks
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint