Re: psql use of 'volatile'

From: Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: psql use of 'volatile'
Date: 2000-06-29 16:36:48
Message-ID: Pine.GSO.4.02A.10006291833310.8364-100000@Rama.DoCS.UU.SE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-06-29 16:37:21 Re: psql use of 'volatile'
Previous Message Bruce Momjian 2000-06-29 16:19:00 Use of volatile