Re: [Patch] Warning fixes for glib



On 29 Oct, Tim Janik wrote:

>> Sorry, too late. 
> well, revert it then.

This is certainly an idea. :)

> nope, anyone actually using G_BREAKPOINT() in production code is right
> out nuts.

G_BREAKPOINT is used in a few places in glib. That's how I stumbled over
the warnings.

> this macro is there as an aid for developers who know what
> they are doing,

Seems not.

> 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.

Since G_BREAKPOINT is used from glib when compiled with debugging
and there's a slight chance that it might segfault instead of
halting the program I'd rather have it defined as a noop for
unsupported platforms instead of an unprototyped function call.

> 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.

If you call signal in your code you call for an system operation and
thus the header should be included. We shouldn't use signal if using
it is not desired, no?

--
Servus,
       Daniel




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