[ECOS] Possible bug in dbg-threads-syscall.c

Martin Buck martin.buck@ascom.ch
Thu Dec 6 07:37:00 GMT 2001


Robin Farine wrote:
> ISO/IEC 9899:1999 (E) 6.3.2.1 paragraph 4 says that a function designator,
> in two special cases excepted, is converted to a pointer to a function.

OK, but that's the wrong way round. Here, we've got a pointer to a
function and dereference it.

Not surprisingly, 6.5.3.2 paragraph 4 says that dereferencing a function
pointer yields a function designator. Of course, if you then want to
*call* that function, you have to apply the function call operator (AKA
()).

Just using a function designator by itself is not very useful, but of
course legal C, since it's only an expression whose result you ignore.
In that case, gcc even warns you about it (if you use -Wall - if you
don't, you deserve to loose ;-) because an expression without side
effects whose result you ignore is pretty pointless.

Martin



More information about the Ecos-discuss mailing list