Re: [Patch] Warning fixes for glib



On Mon, 29 Oct 2001 degger fhm edu wrote:

> On 29 Oct, Tim Janik wrote:
> 
> > the point in writing raise (5 /* SIGTRAP */) was exactly to _not_
> > include signal.h, so please do not commit this.
> 
> Sorry, too late.

well, revert it then.

> > the right way to get rid of the signal is to add more asm statements
> > for not-yet-supported platforms.
> 
> While addign a few bunches of additional ASM instructions might be the
> right way to go having an unconditional broken case isn't very clever
> IMHO as it might break uncommon platforms in very subtle ways.

nope, anyone actually using G_BREAKPOINT() in production code is right out
nuts. this macro is there as an aid for developers who know what they are
doing, and who are too lazy to type the asm statement in place.
supposedly ones clever enough to actually supply asm statements for their
platform if it isn't supported.

> I don't really see what's so bad about including signal.h for
> "unsupported" platforms for now since not having it means compiling
> a call for an unprototyped function which can have all flavours of
> sideeffects.

we don't include system headers in general, but only those that we actually
can't get away without and that can be considered kinda "part of the language",
e.g. the varargs stuff.

G_BREAKPOINT() is about the worst scenario i could possibly think of to
break with that rule.

> 
> --
> Servus,
>        Daniel
> 

---
ciaoTJ




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]