tag 377416 + moreinfo
thanks
On Sat, Jul 08, 2006 at 08:14:35PM +0100, Roger Leigh wrote:
> Package: libc6-dev
> Version: 2.3.6-15
> Severity: important
>
> # if !defined __cplusplus && __GNUC_PREREQ (3, 3)
> # define __THROW __attribute__ ((__nothrow__)) XXXX
> # define __NTH(fct) __attribute__ ((__nothrow__)) fct
> # else
> # if defined __cplusplus && __GNUC_PREREQ (2,8)
> # define __THROW throw ()
> # define __NTH(fct) fct throw ()
> # else
> # define __THROW
> # define __NTH(fct) fct
> # endif
> # endif
>
> The line marked with XXXX expands incorrectly:
>
> void f() __THROW
> ==> void f() __attribute__ ((__nothrow__))
>
> instead of void __attribute__ ((__nothrow__)) f()
I'm not sure to understand where the problem is.
__THROW is meant to be used like this, in a prototype decl:
void f(void) __TROW;
but not in a function implementation :
void f(void) __THROW {
// some impl
}
the former is completely correct and will work as expected. I've not
found an example of a problem caused by that macro, but IMHO it's a
problem in the code you are trying to compile, not because of the macro.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
Attachment:
pgpZYcwm025oz.pgp
Description: PGP signature