bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex cannot be compiled with g++


From: Paul Eggert
Subject: Re: regex cannot be compiled with g++
Date: Fri, 19 Oct 2007 15:56:14 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Sam Steingold <address@hidden> writes:

> this is the standard way to handle calloc/malloc/alloca.

It's one standard way, but there are others.  In C, generally it's
better to avoid the casts, since casts can suppress useful
diagnostics.  So, in C, it's usually better to not cast the results of
malloc.  So there is a tradeoff here between g++ compatibility (a good
thing) and C source code reliability (another good thing).

This casting business is a relatively minor point; I'm more worried
about the old-style function definitions.  I wish I knew why glibc
does it that way.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]