conversion of the __inline__ and inline pragmas to RTEMS_INLINE_ROUTINE?

Ralf Corsepius ralf.corsepius at rtems.org
Wed Nov 9 17:03:50 UTC 2011


On 11/09/2011 05:14 PM, Cudmore, Alan P. (GSFC-5820) wrote:

> A couple of questions:
> 1. Is it dangerous or not good practice to compile the RTEMS source and the application with different flags?
>       ( the flags I listed earlier were for our applications only )
Depends.

-W.. flags are mostly harmless ("mostly", because can trigger hidden 
bugs in gcc as well - Not very likely to happen but also not impossible).

The more agressive -W... flags you are using, the more likely gcc 
produces "false warnings" and "stylish warnings". The problem here is to 
separate "false" from "real" warnings[1]

-Werror is a means to pressurize developers. IMO, in combination with 
hand-crafted/hand-selected -W... flags, it's suitable during certain 
periods of development, but non-suitable as defaults.

All language-dialect changing flags (-ansi, -std=...) and 
code-generation changing (typically -f.. and -0X) flags are potentially 
dangerous.

That said, using different flags than defaults carries risks insofar as 
they have seen less compilation-testing than the defaults.
Or conversely: If you are sufficently confident about your choice flags, 
there isn't much wrong in using them.

> 2. Is RTEMS moving toward C99 compliance?
... yes, very slowly ... but the devil's in the details[2].

Ralf

[1] Real world example: GCC-4.6.x aggressively warns about "set but 
unused variables". Recently having gone after these in RTEMS showed the 
overwhelming majority of these warnings to be "false warnings", however 
there were some real bugs hidden amongst them, older GCCs did not diagnose.

[2] RTEMS is not alone with this situation. Many other non-trivial 
pieces of SW of considerable size are in a similar position.
(I haven't tried recently, but some time ago, not even the then-current 
versions of binutils, gdb and GCC were c99 compliant).



More information about the users mailing list