First Last Prev Next    No search results available
Details
: CWriter doesn't support zero arg vararg functions
Bug#: 56
: libraries
: Backend: C
Status: RESOLVED
Resolution: WONTFIX
: All
: All
: trunk
: P2
: enhancement
: ---

:
: missing-feature
:
: 1052
  Show dependency tree - Show dependency graph
People
Reporter: Chris Lattner <sabre@nondot.org>
Assigned To: Unassigned LLVM Bugs <unassignedbugs@nondot.org>
:

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2003-10-23 12:36
The following is a legal LLVM function, but it causes the CWriter to crash.  It
is not clear how to transform this into legal C code.

declare sbyte* %llvm.va_start()
declare void %llvm.va_end(sbyte*)

void %test(...) {
      %P = call sbyte* %llvm.va_start()
      call void %llvm.va_end(sbyte* %P)
      ret void
}
------- Comment #1 From Chris Lattner 2003-10-23 22:51:33 -------
It's important to note that no LLVM code produced by the C or C++ frontends can
directly have this.  It can only be triggered in two ways:

1. LLVM code written by hand (like the testcase)
2. Optimizations which build new functions or remove arguments could cause this.

W.R.T case #2, the dead argument elimination pass (which is the only one which
could trigger the bug) now has an explicit hack to work around this (it does not
delete all of the fixed arguments to a varargs function).

Because of this, I'm reducing the severity of the bug to "minor".

-Chris
------- Comment #2 From Chris Lattner 2004-02-20 16:41:01 -------
I'm reducing this to 'enhancement', because there is no way to implement this
with ANSI C.  Perhaps there are some extensions to some compiler that could be
used to implement this, but I don't think GCC has them.

-Chris
------- Comment #3 From Chris Lattner 2004-02-26 15:31:26 -------
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
------- Comment #4 From Chris Lattner 2004-02-26 15:32:05 -------
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
------- Comment #5 From Chris Lattner 2004-02-26 15:35:30 -------
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
------- Comment #6 From Chris Lattner 2006-05-02 11:34:47 -------
I'm closing this bug, as there is no way to fix it.   This is just a limitation
of C.

-Chris

First Last Prev Next    No search results available