This is the mail archive of the
libstdc++-prs@sourceware.cygnus.com
mailing list for the libstdc++ project.
libstdc++/70: missing parens in bits/std_complex.h (operator==)
- To: libstdc++-gnats at sourceware dot cygnus dot com
- Subject: libstdc++/70: missing parens in bits/std_complex.h (operator==)
- From: brendan at zen dot org
- Date: 3 Jul 2000 11:51:55 -0000
- Reply-To: brendan at zen dot org
- Resent-Cc: libstdc++-prs at sourceware dot cygnus dot com
- Resent-Reply-To: libstdc++-gnats@sourceware.cygnus.com, brendan@zen.org
>Number: 70
>Category: libstdc++
>Synopsis: missing parens in bits/std_complex.h (operator==)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 03 04:57:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: brendan@zen.org
>Release: CVS tree
>Organization:
>Environment:
n/a
>Description:
In std_complex.h it defines an operator== to try to call
__x.imag(), but it's missing the parentheses for it. The
line is
operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
{ return __x.real() == __y.real() && __x.imag == __y.imag(); }
where it needs to be
operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
{ return __x.real() == __y.real() && __x.imag() == __y.imag(); }
>How-To-Repeat:
>Fix:
Patch attached, change __x.imag to __x.imag().
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="diffs-complex-imag"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="diffs-complex-imag"
MjAwMC0wNi0yOSAgQnJlbmRhbiBLZWhvZSAgPGJyZW5kYW5AemVuLm9yZz4KCgkqIGJpdHMvc3Rk
X2NvbXBsZXguaCAob3BlcmF0b3I9PSk6IEZpeCBjYWxsIG9mIF9feC5pbWFnKCkgdG8gaGF2ZQoJ
aXRzIHBhcmVudGhlc2VzLgoKSW5kZXg6IGJpdHMvc3RkX2NvbXBsZXguaAo9PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJD
UyBmaWxlOiAvY3ZzL2djYy9lZ2NzL2xpYnN0ZGMrKy12My9iaXRzL3N0ZF9jb21wbGV4Lmgsdgpy
ZXRyaWV2aW5nIHJldmlzaW9uIDEuMQpkaWZmIC11IC1wIC1yMS4xIHN0ZF9jb21wbGV4LmgKLS0t
IHN0ZF9jb21wbGV4LmgJMjAwMC8wNC8yMSAyMDozMzoyOAkxLjEKKysrIHN0ZF9jb21wbGV4LmgJ
MjAwMC8wNy8wMyAxMTo0ODoyMQpAQCAtODg4LDcgKzg4OCw3IEBAIG5hbWVzcGFjZSBzdGQKICAg
ICB0ZW1wbGF0ZTx0eXBlbmFtZSBfVHA+CiAgICAgaW5saW5lIGJvb2wKICAgICBvcGVyYXRvcj09
KGNvbnN0IGNvbXBsZXg8X1RwPiYgX194LCBjb25zdCBjb21wbGV4PF9UcD4mIF9feSkKLSAgICB7
IHJldHVybiBfX3gucmVhbCgpID09IF9feS5yZWFsKCkgJiYgX194LmltYWcgPT0gX195LmltYWco
KTsgfQorICAgIHsgcmV0dXJuIF9feC5yZWFsKCkgPT0gX195LnJlYWwoKSAmJiBfX3guaW1hZygp
ID09IF9feS5pbWFnKCk7IH0KIAogICAgIHRlbXBsYXRlPHR5cGVuYW1lIF9UcD4KICAgICBpbmxp
bmUgYm9vbAo=