public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11929] New: Cannot obtain variable arguments list in function with last named argument being of non-POD type
@ 2003-08-15 14:15 jbeulich at novell dot com
2003-08-24 22:16 ` [Bug c++/11929] " dhazeghi at yahoo dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jbeulich at novell dot com @ 2003-08-15 14:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11929
Summary: Cannot obtain variable arguments list in function with
last named argument being of non-POD type
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jbeulich at novell dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
The code
struct s {
s(int);
};
void test(s o, ...) {
__builtin_va_list varg;
__builtin_va_start(varg, o);
}
causes two incorrect warnings:
test.cpp: In function `void test(s, ...)':
test.cpp:7: warning: cannot pass objects of non-POD type `struct s' through
`...'; call will abort at runtime
test.cpp:7: warning: second parameter of `va_start' not last named argument
Even if we were not treating warnings as errors the first one is rather
dangerous (despite it not really putting in a call to abort). In any case, the
warnings are pointless because the program no-where passes an object of type s
through ... (except that __builtin_va_start is of type void()(va_list, ...), but
it is neither an actual function, nor should the fact that it is represented
that way affect the user-visible result of the compilation).
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/11929] Cannot obtain variable arguments list in function with last named argument being of non-POD type
2003-08-15 14:15 [Bug c++/11929] New: Cannot obtain variable arguments list in function with last named argument being of non-POD type jbeulich at novell dot com
@ 2003-08-24 22:16 ` dhazeghi at yahoo dot com
2003-11-29 21:45 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-24 22:16 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11929
dhazeghi at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4 |---
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/11929] Cannot obtain variable arguments list in function with last named argument being of non-POD type
2003-08-15 14:15 [Bug c++/11929] New: Cannot obtain variable arguments list in function with last named argument being of non-POD type jbeulich at novell dot com
2003-08-24 22:16 ` [Bug c++/11929] " dhazeghi at yahoo dot com
@ 2003-11-29 21:45 ` pinskia at gcc dot gnu dot org
2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-29 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-29 21:45 -------
This is a dup of bug 11971.
*** This bug has been marked as a duplicate of 11971 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11929
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/11929] Cannot obtain variable arguments list in function with last named argument being of non-POD type
2003-08-15 14:15 [Bug c++/11929] New: Cannot obtain variable arguments list in function with last named argument being of non-POD type jbeulich at novell dot com
` (2 preceding siblings ...)
2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
@ 2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-12-09 4:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-12-09 04:08 -------
Subject: Bug 11929
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jason@gcc.gnu.org 2003-12-09 04:08:50
Modified files:
gcc/cp : ChangeLog call.c cp-tree.h ptree.c tree.c
Log message:
PR c++/11971
* tree.c (build_local_temp): Split out from build_cplus_new.
(force_target_expr): New fn.
* call.c (call_builtin_trap): Call it. Take a type parm.
(convert_arg_to_ellipsis): Pass it.
(build_x_va_arg): Use call_builtin_trap.
PR c++/11929
* call.c (magic_varargs_p): New fn.
(build_over_call): Do no ellipsis conversions for arguments to
functions with magic varargs.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3789&r2=1.3790
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.442&r2=1.443
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.936&r2=1.937
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ptree.c.diff?cvsroot=gcc&r1=1.37&r2=1.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&r1=1.355&r2=1.356
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11929
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/11929] Cannot obtain variable arguments list in function with last named argument being of non-POD type
2003-08-15 14:15 [Bug c++/11929] New: Cannot obtain variable arguments list in function with last named argument being of non-POD type jbeulich at novell dot com
2003-08-24 22:16 ` [Bug c++/11929] " dhazeghi at yahoo dot com
2003-11-29 21:45 ` pinskia at gcc dot gnu dot org
@ 2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-12-09 4:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-12-09 04:08 -------
Subject: Bug 11929
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jason@gcc.gnu.org 2003-12-09 04:08:21
Added files:
gcc/testsuite/g++.dg/other: stdarg2.C
Log message:
PR c++/11929
* call.c (magic_varargs_p): New fn.
(build_over_call): Do no ellipsis conversions for arguments to
functions with magic varargs.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/stdarg2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11929
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-12-09 4:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-15 14:15 [Bug c++/11929] New: Cannot obtain variable arguments list in function with last named argument being of non-POD type jbeulich at novell dot com
2003-08-24 22:16 ` [Bug c++/11929] " dhazeghi at yahoo dot com
2003-11-29 21:45 ` pinskia at gcc dot gnu dot org
2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
2003-12-09 4:08 ` cvs-commit 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).