Re: psql use of 'volatile' - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: psql use of 'volatile'
Date
Msg-id 200006291637.MAA06306@candle.pha.pa.us
Whole thread Raw
In response to psql use of 'volatile'  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
[ Charset ISO-8859-1 unsupported, converting... ]
> On Thu, 29 Jun 2000, Bruce Momjian wrote:
> 
> > Can someone explain why 'volatile' is used in psql/mainloop.c?
> 
> If you remove them then you get tons of warnings about variables possibly
> getting clobbered. The reason is the longjmp business that's going on when
> you press Control-C. (The fact that the variables would get clobbered is
> not critical since they're reinitialized immediately anyway, but who am I
> to argue with the compiler.)

Agreed.


--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Use of volatile
Next
From: Alfred Perlstein
Date:
Subject: Re: Use of volatile