c++/2470: Incorrect warning: control reaches end of non-void function

daniel.frey@aixigo.de daniel.frey@aixigo.de
Tue Apr 3 01:36:00 GMT 2001


>Number:         2470
>Category:       c++
>Synopsis:       Incorrect warning: control reaches end of non-void function
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 03 01:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     daniel.frey@aixigo.de
>Release:        gcc-2.95.[23]
>Organization:
>Environment:
Linux 2.2 and various other
>Description:
An incorrect warning is given. It seems that this warning
has it's source in the optimizer, some people on gnu.gcc.help
tested it for different targets on different plateforms.
In larger projects, this bug can lead to extreme long and
memory-consuming compilation processes (over 5 min and 1GB
for a program that only needs 20 sec and 100MB to compile
otherwise).
>How-To-Repeat:
Recompile the example
>Fix:
No real fix known
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="t.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="t.cc"

Ly8gQ29tcGlsZWQgdXNpbmcgZ2NjIDIuOTUuMjogZysrIC1PMSAtV2FsbCBbLWddIFstYW5zaV0g
Wy1wZWRhbnRpY10gLWMgLW8gdC5vIHQuY2MKLy8KLy8gUHJvYmxlbTogdC5jYzo0Mzogd2Fybmlu
ZzogY29udHJvbCByZWFjaGVzIGVuZCBvZiBub24tdm9pZCBmdW5jdGlvbiBgdGVzdChjb25zdCBG
b28gJiknCi8vCi8vIFRoZSB3YXJuaW5nIGNhbiBiZSByZW1vdmVkIGJ5IGFueSBvZiB0aGVzZSBj
aGFuZ2VzOgovLyAtIENvbXBpbGUgd2l0aCAtTzAgaW5zdGVhZCBvZiAtTzEKLy8gLSBSZXBsYWNl
ICdGb28nIHdpdGggJ3N0cmluZycgaW4gbGluZSAvLzEKLy8gLSBSZW1vdmUgbGluZSAvLzIKLy8g
LSBSZXBsYWNlICdEdW1teScgYnkgJ2ludCcgaW4gbGluZSAvLzIKLy8gLSBSZXBsYWNlICd2ZWN0
b3InIGJ5ICdsaXN0JyBpbiBsaW5lIC8vMgovLyAtIFJlcGxhY2UgJ0JhciggZiApJyBieSAnQmFy
KCknIGluIGxpbmUgLy8zCgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxzdHJpbmc+CiNp
bmNsdWRlIDx2ZWN0b3I+CiNpbmNsdWRlIDxsaXN0Pgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xh
c3MgRHVtbXkge307CgpjbGFzcyBGb28Kewpwcml2YXRlOgogICBzdHJpbmcgc187CiAgICAgIApw
dWJsaWM6CiAgIEZvbyggY29uc3QgY2hhciogcyApIDogc18oIHMgKSB7fQogICBvcGVyYXRvciBz
dHJpbmcoKSBjb25zdCB7IHJldHVybiBzXzsgfQp9OwoKY2xhc3MgQmFyCnsKcHVibGljOgogICBC
YXIoKSB7fQogICBCYXIoIGNvbnN0IHN0cmluZyYgcyApIHt9Cn07CgpCYXIgdGVzdCggY29uc3Qg
Rm9vJiBmICkgLy8xCnsKICAgdmVjdG9yPCBEdW1teSA+IHY7IC8vMgogICAKICAgcmV0dXJuIEJh
ciggZiApOyAvLzMKfQoKaW50IG1haW4oKQp7CiAgIHRlc3QoICJIZWxsbywgd29ybGQhIiApOwog
ICByZXR1cm4gMDsKfQo=



More information about the Gcc-bugs mailing list