This is the mail archive of the gcc-prs@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]

c/7860: few new suggested warnings


>Number:         7860
>Category:       c
>Synopsis:       few new suggested warnings
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 08 15:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jarkko hietaniemi
>Release:        any
>Organization:
>Environment:
any
>Description:
I was the release manager of the Perl 5.8.0 project.  As a part of that, we did a lot of test building on many platforms to clean up the C source code of Perl, and saw a lot of warnings about dubious practices that gcc didn't catch.

Therefore, I would like to suggest adding these warnings to some upcoming gcc release. 

Some of the suggested warnings are already there but one needs either -ansi or -pedantic to enable them, and in some projects (including Perl) this is not an option, therefore having the warnings still available separately would be a good thing.  (In general, maybe "disassembling" -ansi and -pedantic into separate options would be beneficial?)

Some of the suggested warnings do not seem to be there and therefore they would be completely new.

The suggested warnings are in the file attachment.
>How-To-Repeat:

>Fix:
Implement the new warnings :-)
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-macbinary; name="gccneedwarn"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gccneedwarn"

AAtnY2NuZWVkd2FybgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQpAAAAALmhQPS5oUD0AAAAbUJJTgAAAAAAAAAA
AAAAAAAAAACCgYstAAAtV2NwcGNvbW1lbnQKCiAgICAgICAgV2FybiBhYm91dCBDKysgc3R5bGUg
Y29tbWVudHMgLy8gbGlrZSB0aGlzLgoKLVdnbnVleHRlbnNpb25zCgogICAgICAgIFdhcm4gYWJv
dXQgdGhlIHVzZSBvZiBhbnkgR05VIGV4dGVuc2lvbnMuCgotV3BvaW50ZXItaW1wbGljaXQtc2ln
bgoKICAgICAgICBXYXJuIGlmIGEgcG9pbnRlciBpcyBpbXBsaWNpdGx5IGNhc3QgYmV0d2VlbiBz
aWduZWQKICAgICAgICBhbmQgdW5zaWduZWQsIGZvciBleGFtcGxlOgoKICAgICAgICAgICAgaW50
IGZvbyh1bnNpZ25lZCBjaGFyICpzKSB7CiAgICAgICAgICAgICAgICAuLi4KICAgICAgICAgICAg
fQogICAgICAgICAgICAgICAgLi4uCiAgICAgICAgICAgICAgICBjaGFyICpzOwogICAgICAgICAg
ICAgICAgLi4uCiAgICAgICAgICAgICAgICBmb28ocyk7CgogICAgICAgIChlbmFibGVkIGJ5IC1h
bnNpKQoKLVdlbnVtLWltcGxpY2l0LWludAoKICAgICAgICBXYXJuIGlmIGVudW1zIGFyZSBpbXBs
aWNpdGx5IHVzZWQgYXMgaW50ZWdlcnMsIGZvciBleGFtcGxlCgogICAgICAgIGVudW0gZSB7IEUx
LCBFMiwgRTMgfTsKICAgICAgICAuLi4KICAgICAgICBlbnVtIGUgZTEgPSAwOyAgLyogV2Fybi4g
Ki8gCiAgICAgICAgZW51bSBlIGUyID0gRTI7CiAgICAgICAgZW51bSBlIGUzLCBlNDsKICAgICAg
ICBlMyA9IGUxICsgMTsgICAgLyogV2Fybi4gKi8KICAgICAgICBlMisrOyAgICAgICAgICAgLyog
V2Fybi4gKi8KICAgICAgICBlNCA9IGUzICYgfkUyOyAgLyogV2Fybi4gKi8gCgotV2VudW0tdHJh
aWxpbmctY29tbWEKCiAgICAgICAgV2FybiBpZiBlbnVtIGRlY2xhcmF0aW9uIGhhcyBhIHRyYWls
aW5nIGNvbW1hLgoKICAgICAgICAoZW5hYmxlZCBieSAtcGVkYW50aWMpCgotV2NwcC1zcHVyaW91
cy10b2tlbnMKCiAgICAgICAgV2FybiBpZiB0aGVyZSBhcmUgYW55IHVubmVjZXNzYXJ5IHRva2Vu
cyBhZnRlciBwcmVwcm9jZXNzb3IgY29tbWFuZHMsCiAgICAgICAgZm9yIGV4YW1wbGUKCiAgICAg
ICAgICAgICNlbmRpZiBTVFVGRgoKICAgICAgICAoZW5hYmxlZCBieSAtcGVkYW50aWMpCgoAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=


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