Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian GCC (http://www.linux-archive.org/debian-gcc/)
-   -   Bug#451707: Acknowledgement (gdc-4.1: gdc is confused by variadic arguments in (C) mode) (http://www.linux-archive.org/debian-gcc/144-bug-451707-acknowledgement-gdc-4-1-gdc-confused-variadic-arguments-c-mode.html)

Pierre Habouzit 11-17-2007 09:07 PM

Bug#451707: Acknowledgement (gdc-4.1: gdc is confused by variadic arguments in (C) mode)
 
retitle 451707 D should send foo[] as a foo* when used in a variadic argument in extern(C) context
severity 451707 important
thanks

I understood the issue: when the "-c" argument is sent as the first
argument of the variadic part, D sends a char[] and not a char*, meaning
that it puts 2, "-c" on the stack, which confuses the C.


I believe that D should do the implicit cast in that case, as it'll
break a _lot_ of programs using C APIs and variadic arguments in very
subtle ways.

--
O Pierre Habouzit
O madcoder@debian.org
OOO http://www.madism.org


All times are GMT. The time now is 05:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.