[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Re: Stack over-run
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] Re: Stack over-run |
Date: |
Sat, 16 Feb 2002 22:52:54 +0100 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode) |
Dan wrote:
> #define TRACE if (!(verbose)) ; else gprintf
> #define RTRACE if (!(verbose >= 3)) ; else gprintf
> #define VTRACE if (!(verbose >= 4)) ; else gprintf
> /* if debug == 0, then can skip the function call. */
> #define DEBUG if (!debug) ; else DEBUG_func
>
> that causes the warnings. These definitions were changed
> in the patch trevor_1_25.2. If we then use
>
> if (condition) TRACE( ...)
>
> this unravels to
>
> if (condition) if (!verbose) ; else gprintf( )
>
> which of course is ambiguous.
The common macro idiom
do { \
... \
} while (0)
is safe against this problem.
Trevor wrote:
> I think that would be fine, however, the keyword 'inline' is not
> used anywhere in gnugo, so I'd suspected there must be some other
> compatibility reason for that.
The inline keyword was introduced in the most recent revision of
standard C, called C99. We only want to require the older C89
standard.
/Gunnar
- [gnugo-devel] Re: Stack over-run, Trevor Morris, 2002/02/14
- Re: [gnugo-devel] Re: Stack over-run, Daniel Bump, 2002/02/14
- Re: [gnugo-devel] Re: Stack over-run, Daniel Bump, 2002/02/16
- Re: [gnugo-devel] Re: Stack over-run, Trevor Morris, 2002/02/16
- Re: [gnugo-devel] Re: Stack over-run, Daniel Bump, 2002/02/16
- Re: [gnugo-devel] Re: Stack over-run,
Gunnar Farneback <=
- Re: [gnugo-devel] Re: Stack over-run, Trevor Morris, 2002/02/16
- Re: [gnugo-devel] Re: Stack over-run, Gunnar Farneback, 2002/02/17
- Re: [gnugo-devel] Re: Stack over-run, Daniel Bump, 2002/02/19
- Re: [gnugo-devel] Re: Stack over-run, Dave Denholm, 2002/02/19
- Re: [gnugo-devel] Re: Stack over-run, Daniel Bump, 2002/02/19