Commit Graph

10 Commits

Author SHA1 Message Date
Jeff Cohen
66c5fd6c53 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23888 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 04:37:20 +00:00
Chris Lattner
f6b5c1abce Don't forget these are calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21730 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 06:21:59 +00:00
Chris Lattner
47968e4dfd These are legal for tail calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21723 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 05:59:50 +00:00
Misha Brukman
237cef4b0b Remove trailing whitespace at the end of lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21380 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 16:42:34 +00:00
Alkis Evlogimenos
dadf88123f Stop using abegin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20609 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 07:12:30 +00:00
Misha Brukman
7cf540bba0 Clean up code layout, delete extra blank line, say fibonacci' instead of foo'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17478 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-05 04:11:40 +00:00
Chris Lattner
3c7d7ee761 Fix typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17466 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-04 05:00:18 +00:00
Chris Lattner
38f024daea Cleanup this example, simplifying it and making it conform to LLVM coding
standards


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17459 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-03 21:43:03 +00:00
Reid Spencer
66e7cd0eea Correct the file header to reflect the new "examples" home for the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16295 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-11 20:30:11 +00:00
Reid Spencer
e784fa40c5 Add the fibonacci example provided by Valery Khamenya.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15924 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-19 20:10:04 +00:00