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

From Peter Eisentraut
Subject Re: psql use of 'volatile'
Date
Msg-id Pine.GSO.4.02A.10006291833310.8364-100000@Rama.DoCS.UU.SE
Whole thread Raw
In response to psql use of 'volatile'  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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.)

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: "Scott Winterstein"
Date:
Subject: database into website
Next
From: Peter Eisentraut
Date:
Subject: Automatic dependency generation