RTEMS | confdefs.h fails to compile when included in C++20 source (#5145)
Lucian Silistru (@lsilistr)
gitlab at rtems.org
Wed Nov 6 17:03:30 UTC 2024
Lucian Silistru commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5145#note_114411
One thing to note, it seems that, as a check, changing Atomic_Uint from SMP_ticket_lock_Control / Atomic_Ulong from struct Scheduler_Node to unsigned int / unsigned long long makes the error go away. All the atomic ops functions will also need to be changed to use integer math.
I used the preprocessor output of init.cc (added -E to iostream.yml cxxflags, init.cc.NN.o will contain preprocessor output; g++ requires this not end in .o to recompile).
Seems std::atomic<integral_type> default constructor is no longer trivial since C++20 and this may cause a chain reaction into the failing definitions.
https://en.cppreference.com/w/cpp/atomic/atomic/atomic
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5145#note_114411
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241106/437ef90b/attachment.htm>
More information about the bugs
mailing list