This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: complex arithmetic and signed zero?


On Wed, 12 Oct 2005, Steve Kargl wrote:

> On Wed, Oct 12, 2005 at 01:24:41PM -0700, Richard Henderson wrote:
> > On Wed, Oct 12, 2005 at 10:49:44AM -0700, Steve Kargl wrote:
> > > How does one set z = 0 - I 0 in a portable manner with gcc?
> > 
> >   z = conj(0);
> > 
> 
> I came to your solution after posting my question.
> Unfortunately, the point of my original question 
> was missed.  gcc is not following Annex G in n1124.pdf.
> In particular, see G.5.1  Multiplicative operators.

You don't say which paragraph of G.5.1 you are thinking of - paragraph 2 
is of course irrelevant (GCC doesn't implement _Imaginary and the 
imaginary type specifications in that informative annex are in direct 
conflict with the normative parts of the standard and of doubtful value to 
implement) while GCC versions before 4.0 don't make any attempt to 
implement the algorithm of paragraph 6 (which itself has been criticised, 
and only gets used by 4.x with -std=c99).

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]