public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30171]  New: non-portable va_list abuse is permitted on i386
@ 2006-12-12 11:19 dwmw2 at infradead dot org
  2006-12-12 17:32 ` [Bug c/30171] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dwmw2 at infradead dot org @ 2006-12-12 11:19 UTC (permalink / raw)
  To: gcc-bugs

See https://bugs.helixcommunity.org/show_bug.cgi?id=5641 -- particularly the
assignment to va_list (the references are uncommon enough that they probably
don't matter).

The world would be a better place if this kind of code would fail to build, or
at least _warn_, on i386. The ABI might not allow us to make va_list 'const'
but we could perhaps add an __attribute__((va_list)) which marks it for
'special' treatment?

This warning could perhaps be enabled by default on any platform which code is
expected to be portable (like Linux) but disabled on i386-only platforms
(win32).


-- 
           Summary: non-portable va_list abuse is permitted on i386
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dwmw2 at infradead dot org


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


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

* [Bug c/30171] non-portable va_list abuse is permitted on i386
  2006-12-12 11:19 [Bug c/30171] New: non-portable va_list abuse is permitted on i386 dwmw2 at infradead dot org
@ 2006-12-12 17:32 ` pinskia at gcc dot gnu dot org
  2006-12-12 17:33 ` dwmw2 at infradead dot org
  2006-12-24  4:50 ` [Bug c/30171] non-portable va_list abuse should be diagnostic pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-12 17:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-12 17:31 -------
> This warning could perhaps be enabled by default on any platform which code is
> expected to be portable (like Linux) but disabled on i386-only platforms
> (win32).

No, I disagree with the last part of that statement because people do port code
from windows to other targets all the time.  Oh and win32 has a x86_64 port
comming sometime in the future so that goes out the window there.

Also game developers port between windows and Linux would like the warning to
be in MS's compilers also because otherwise they will not change their code
(yes I have people tell me that since it works with MS's compilers, it should
work with GCC).


-- 


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


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

* [Bug c/30171] non-portable va_list abuse is permitted on i386
  2006-12-12 11:19 [Bug c/30171] New: non-portable va_list abuse is permitted on i386 dwmw2 at infradead dot org
  2006-12-12 17:32 ` [Bug c/30171] " pinskia at gcc dot gnu dot org
@ 2006-12-12 17:33 ` dwmw2 at infradead dot org
  2006-12-24  4:50 ` [Bug c/30171] non-portable va_list abuse should be diagnostic pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: dwmw2 at infradead dot org @ 2006-12-12 17:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dwmw2 at infradead dot org  2006-12-12 17:33 -------
Yeah, fair enough. Enable the warning by default everywhere then.


-- 


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


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

* [Bug c/30171] non-portable va_list abuse should be diagnostic
  2006-12-12 11:19 [Bug c/30171] New: non-portable va_list abuse is permitted on i386 dwmw2 at infradead dot org
  2006-12-12 17:32 ` [Bug c/30171] " pinskia at gcc dot gnu dot org
  2006-12-12 17:33 ` dwmw2 at infradead dot org
@ 2006-12-24  4:50 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-24  4:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-12-24 04:50 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-24 04:50:11
               date|                            |
            Summary|non-portable va_list abuse  |non-portable va_list abuse
                   |is permitted on i386        |should be diagnostic


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


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

end of thread, other threads:[~2006-12-24  4:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-12 11:19 [Bug c/30171] New: non-portable va_list abuse is permitted on i386 dwmw2 at infradead dot org
2006-12-12 17:32 ` [Bug c/30171] " pinskia at gcc dot gnu dot org
2006-12-12 17:33 ` dwmw2 at infradead dot org
2006-12-24  4:50 ` [Bug c/30171] non-portable va_list abuse should be diagnostic pinskia 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).