Re: compile warnings in CVS HEAD?

Поиск
Список
Период
Сортировка
От Kurt Roeckx
Тема Re: compile warnings in CVS HEAD?
Дата
Msg-id 20030904171408.GA14879@ping.be
обсуждение исходный текст
Ответ на Re: compile warnings in CVS HEAD?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: compile warnings in CVS HEAD?  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
On Wed, Sep 03, 2003 at 10:30:05PM -0400, Tom Lane wrote:
> 
> > tablecmds.c: In function `validateForeignKeyConstraint':
> > tablecmds.c:3546: warning: dereferencing type-punned pointer will break
> > strict-aliasing rules
> 
> Hm.  Got any idea what these are really complaining about?  I see no
> such gripes with the gcc versions I use, but I wouldn't be surprised
> if gcc 3.3 is trying to tighten up.

It's about optimisation.

The compiler is free to assume that 2 pointers of a different
type never point to the same variable.

It basicly happens when you cast a pointer of 1 type to an other.

See the gcc info page for a little more information.

The recommended way to deal with is to put them into a union.


Kurt



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Adam Kavan
Дата:
Сообщение: Re: Stats Collector Error 7.4beta1 and 7.4beta2
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: TCP/IP with 7.4 beta2 broken?