size_t or int for malloc-type functions?19139 (12/31/2006 1:21:22 PM) comp.lang.c Rcently I posted code in this group, to help a user that asked to know how he could find out the size of a block allocated with malloc. As always when I post something, the same group of people started to try ... jacob(2538)
realloc zero bytes?6435 (1/9/2007 8:43:48 PM) comp.lang.c The C standard doesn't say anything about what happens when you call realloc with a size argument of 0. Both glibc and openbsd appear to return a valid pointer to a zero-sized object.. e.g. the return of a ma... rcs4646(32)
multiple global variable definitions1027 (3/19/2007 2:10:29 PM) comp.lang.c Suppose I declare a global variable int g; in two different files say a.c which has main() and b.c When I compile them to build an executable under gcc in Redhat Linux with the command gcc -std=c99 -pedanti... subramanian100in(346)
Qry : Behaviour of fgets -- ?346182 (9/6/2007 5:38:55 PM) comp.unix.programmer Machine 1 : bash-3.00$ uname -a SunOS 5.10 Generic_118822-30 sun4u sparc SUNW,Sun-Fire-280R bash-3.00$ gcc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/ specs gcc version 2.95.3 2... raxitsheth2000863(74)
C needs a BOOST28338 (10/3/2007 8:05:28 PM) comp.lang.c It would be really nice if C could adopt a really nice algorithms library like C++'s STL + BOOST. The recent "reverse the words in this sentence" problem posted made me think about it. It's like 5 lines to do ... dcorbit(2696)
A function is an address4232 (12/7/2007 8:28:15 PM) comp.lang.c Ignoring implementation details and strictly following the C99 standard in terms of semantics, is there anything fundamentally flawed with describing the use of a (non-inline) function as an address[1]? I keep ... happyfrosty(97)
Operator ~ with complex arguments624 (7/9/2008 2:44:45 PM) comp.lang.c Consider this code: #include int main(void) { double complex c = 0.4+2.9I; c = ~c; } Is this legal? The standard says about the ~ operator: 6.5.5.3 The result of the ~ operator is the bitwise complemen... jacob4111(1334)
A very interesting book13343 (7/22/2008 6:53:12 PM) comp.lang.c Buffer overflows are a fact of life, and, more specifically, a fact of C. All is not lost however. In the book "Value Range Analysis of C programs" Axel Simon tries to establish a theoretical framework for a... jacob4111(1334)
The threading specs in the standard: a new catastrophe6949 (7/7/2011 10:33:48 AM) comp.lang.c The committee has decided, for reasons unknown to me (there is no explanation why is this necessary anywhere) to go on with the flawed Dinkum library specs and proclaim that library as the new standard specs ... jacob31(874)