Skip site navigation (1) Skip section navigation (2)

Re: ANSI-strict pointer aliasing rules

From: Taral <taralx(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ANSI-strict pointer aliasing rules
Date: 2006-04-27 17:04:45
Message-ID: fa0147d90604271004y1de0a397q60e5fa4da1574e3@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 4/27/06, Zeugswetter Andreas DCP SD <ZeugswetterA(at)spardat(dot)at> wrote:
> Can you please explain what exactly was not working ?
> xlc has in the past shown warnings that were actually problematic code
> that gcc did not show (and the cc variant of xlc also does not show).

This has nothing to do with warnings. With xlc version 6, this code:

Value *
makeString(char *str)
{
	Value	   *v = makeNode(Value);

	v->type = T_String;
	v->val.str = str;
	return v;
}

Will return objects whose "type" field is T_Value (650), because the
compiler reorders the assignment that makeNode makes with that of the
main function.

--
Taral <taralx(at)gmail(dot)com>
"You can't prove anything."
    -- Gödel's Incompetence Theorem

In response to

pgsql-hackers by date

Next:From: TaralDate: 2006-04-27 17:10:31
Subject: Re: ANSI-strict pointer aliasing rules
Previous:From: Tom LaneDate: 2006-04-27 16:58:11
Subject: Re: GIN - Generalized Inverted iNdex. Try 3.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group