cancel
Showing results for 
Search instead for 
Did you mean: 

__DATE__ macro expension incorrect in editor

unsigned_char_array
Senior III

Gcc and Visual Studio correctly compile today's date __DATE__ to "May  6 2024". However STM32CubeIDE editor expands the macro incorrectly if I hover the cursor over it.

  • Month name is in Dutch
  • Month name is in lower case
  • Day of month is left-padded with 0 instead of a space

Schermafbeelding 2024-05-06 135149.png

 

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
5 REPLIES 5
SofLit
ST Employee

Hello,

I didn't reproduce the issue with CubeIDE 1.15.1 (today May 7th 2024):

SofLit_0-1715100169632.png

If you could share your sample project so I can reproduce it from my side. Also indicate the CubeIDE version you're using.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

I use STM32CubeIDE 1.11.2 at the moment. My system language is Dutch. I can check if the same problem persists with a newer version.
You did manage to reproduce part of the issue. The day of the month should not be left-padded with a zero, but with a space. If you compile GCC uses the proper format. It's only the preview in the editor that is incorrect.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

Hello,

This is what I get with CubeIDE 1.15.1:

SofLit_1-1715159673670.png

Day of month is left padded with a space.

Ok then it's only the display popup is different but the string contains the correct char: a space. Do you see an issue in that behavior?

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
unsigned_char_array
Senior III

Issues are only in macro expansion in editor (popup as you call it), not in binary.

I tested with a freshly generated project and an old project and in version 1.15.1 as well. Issue is not project specific.
In STM32CubeIDE 1.15.1 I get the same result as you. So only the left-padding issue, not the language or capitalization. And in 1.11.2 and 1.10.1 I see all three issues. So it seems the issue got half-fixed at some point.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

Ok.

I'm not seeing a blocking issue in that since it's only a display and doesn't impact the cross-compilation result meanwhile I'm raising the internal ticket 180951 to fix this minor issue. This ticket is not accessible by community members.

I will get back to you for any feedback: to fix or not to fix.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.