Coding style: C++ style comments

Ralf Corsepius ralf.corsepius at rtems.org
Mon Jul 11 09:37:46 UTC 2011


On 07/11/2011 10:50 AM, Peter Dufault wrote:
> On Jul 11, 2011, at 1:06 , Ralf Corsepius wrote:
>
>> ... nevertheless, please don't use them, because they introduce
>> avoidable problems to c-std-compatibility testing.
> Could you expand on this comment, that is, what testing it is that it affects?

To check RTEMS/newlib/gcc for issues related to portability and to 
compliance to c-/c++ standards, I occasionally build RTEMS using 
different types of "-std=..." flags in CFLAGS, with "-ansi" and 
"-std=c99" being the extremal corner cases [1].

I.e. I am deliberately trying to provoke issues gcc's and RTEMS's 
"liberal" default cflags try to hide away from users.

During these attempts, "//" comments in c-files add (fairly minor) 
nuissances, which could easily be avoided by contributors not using them.

Ralf

[1] The sad and unpleasant truth is, there are parts in RTEMS and it's 
toolchain (esp. newlib) which are neither c89/c90 nor c99 compliant, 
which means neither of these cases works smoothly.




More information about the users mailing list