Re: unused for all platforms
- From: Miroslaw Dobrzanski-Neumann <mne mosaic-ag com>
- To: GTKDEV <gtk-devel-list gnome org>
- Subject: Re: unused for all platforms
- Date: Mon, 18 Feb 2002 15:48:29 +0100
On Mon, Feb 18, 2002 at 03:10:14PM +0100, Daniel Egger wrote:
> Am Mon, 2002-02-18 um 09.49 schrieb Miroslaw Dobrzanski-Neumann:
>
> > As I know there is no compiler that generates code for statements like
> > "p = *&p"
>
> Actually that would have to be "p = p" which is valid C and means
> what it reads (i.e. Initialise p with the value it had before, whatever
> that was; probably random).There was some hefty discussion on the gcc
> mailinglist whether that really is the proper fix to prevent the
> "variable blah might be used uninitialised" warnings and the only
> conclusion they have reached was that it's totally valid C but should
> be discouraged.
why?
p = *&p guarantees that p does not go into cpu register (its address is
taken).
We use this construct as DO_NOT_CLOBBER(p) when using DCE exceptions.
> Better would be to use the special attributes of gcc or pragmas of
> other compilers to hint the compiler into the right direction. Of course
> avoiding unused parameters would be the best idea after all.
which ends in many #ifdef/#pragma parts which not necessary improve the
readability of code.
BTW.
What about implementing exception handling in terms of setjmp/longjmp like DCE
does?
--
Miroslaw Dobrzanski-Neumann
MOSAIC SOFTWARE AG
Base Development and Research
Tel +49-2225-882-291
Fax +49-2225-882-201
E-mail: mne mosaic-ag com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]