c++/2905: Wrong warning cast when using vector class

sante@genome.wi.mit.edu sante@genome.wi.mit.edu
Tue May 22 14:16:00 GMT 2001


>Number:         2905
>Category:       c++
>Synopsis:       Wrong warning cast when using vector class
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          mistaken
>Submitter-Id:   net
>Arrival-Date:   Tue May 22 14:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     sante@genome.wi.mit.edu
>Release:        gcc version 2.95.2
>Organization:
>Environment:
OSF1 V4.0 1229 alpha alpha
>Description:
Compiling the attached file with optimization
and Wall makes the compiler cast a wrong warning.
>How-To-Repeat:
gcc -c -O3 -Wall EvilCompiler.cc
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="EvilCompiler.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="EvilCompiler.cc"

Ly8gZ2NjIC1jIC1PMyAtV2FsbCBFdmlsQ29tcGlsZXIuY2MKCiNpbmNsdWRlIDx2ZWN0b3I+Cgpj
bGFzcyBibG9iIHsKCnB1YmxpYzoKICBibG9iKCkgeyB4PTA7IH0KICB+YmxvYigpIHt9CiAgdW5z
aWduZWQgaW50IHg7Cgp9OwoKaW50IEJsb2JiZXIoICkKewogIHZlY3RvcjxibG9iPiB0OwogIAog
IGlmICggMCA+IDEgKQogICAgcmV0dXJuIDE7CiAgZWxzZQogICAgcmV0dXJuIDA7Cn0K



More information about the Gcc-bugs mailing list