This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Complex division (was Re: c/2995: __complex__ int typecasts maybe broken)
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Cc: Dara Hazeghi <dhazeghi at yahoo dot com>, gcc at gcc dot gnu dot org
- Date: 08 May 2003 16:24:46 +0200
- Subject: Complex division (was Re: c/2995: __complex__ int typecasts maybe broken)
- Organization: Integrable Solutions
- References: <20030508084601.29157.qmail@sources.redhat.com><Pine.LNX.4.53.0305080951210.25021@kern.srcf.societies.cam.ac.uk>
"Joseph S. Myers" <jsm28@cam.ac.uk> writes:
| On Thu, 8 May 2003, Dara Hazeghi wrote:
|
| > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-
| > trail&database=gcc&pr=2995
| >
| > Confirmed with mainline 20030507
|
| We know what the underlying problem is here (thread starting at
| <http://gcc.gnu.org/ml/gcc/2001-11/msg00790.html>) - the question is
| whether we can deprecate complex integers altogether, or just complex
| integer division.
Deprecating "__complex__ integer-type" is an overkill solution to this
kind of problem, IMO.
Like Joe suggested, deprecating only the problematic operations should
be sufficient. There are uses of "__complex__ integer-type" in Number
Theory (they actually form a ring known as Gaussian ring).
Given that complex numbers can also advantageously used to implement
points or vectors in the Euclidean plane (one gets inner product and
cross product i.e. determinant for free). It would serve any useful
purpose to deprecate __complex__ integer-type just because a some
operations are not meaningful. Rather, use of those operations should
be diagnosed.
-- Gaby