public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/41142]  New: make implicit pointer conversions an error when sizeof(int) != sizeof(void *)
@ 2009-08-21 16:50 dannf at dannf dot org
  2009-08-21 17:03 ` [Bug c/41142] " redi at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: dannf at dannf dot org @ 2009-08-21 16:50 UTC (permalink / raw)
  To: gcc-bugs

Implicit pointer conversions on ia64 are guaranteed to result in a segfault if
the value is dereferenced. This issue can be easily identified by looking for a
combination of gcc warnings. In fact, I have been running all of the build logs
or the Debian distribution through a script that scans for this issue for
several years, and it has caught hundreds of these problems:

http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=dannf@debian.org;which=tag&data=implicit-pointer-conversion&archive=no

script here: http://people.debian.org/~dannf/check-implicit-pointer-functions

I don't know anything about gcc internals, but I'm wondering if it is possible
to generate an error when the appropriate combination of warning conditions is
present?


-- 
           Summary: make implicit pointer conversions an error when
                    sizeof(int) != sizeof(void *)
           Product: gcc
           Version: 4.3.4
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dannf at dannf dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41142


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c/41142] make implicit pointer conversions an error when sizeof(int) != sizeof(void *)
  2009-08-21 16:50 [Bug c/41142] New: make implicit pointer conversions an error when sizeof(int) != sizeof(void *) dannf at dannf dot org
@ 2009-08-21 17:03 ` redi at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu dot org @ 2009-08-21 17:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from redi at gcc dot gnu dot org  2009-08-21 17:03 -------
-Werror=int-to-pointer-cast will make one class of warnings into errors, but I
don't think there's a switch to handle the other cases your script detects.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41142


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-21 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-21 16:50 [Bug c/41142] New: make implicit pointer conversions an error when sizeof(int) != sizeof(void *) dannf at dannf dot org
2009-08-21 17:03 ` [Bug c/41142] " redi at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).