[ccan] Mathematics Module

Tim Post echo at echoreply.us
Wed Jan 28 21:41:51 EST 2009


On Wed, 2009-01-28 at 20:33 +1030, Rusty Russell wrote:

> Hmm, it's proven useful in the past to have -Werr.  But delete it for now from the Makefile.

Please un-delete it, If some other module gets heavy reports of bogus
output from an ellipsis fed function (and said author of said function
decides to use __attribute to throw warnings) , it would shoot their
efforts in the foot.

The build should break when this happens, especially when a robot is
doing the build. Likely, someone forgot to cast something or (worse)
forgot what they were dealing with.

There are very few times when gcc is being an asshole just for the sake
of being one except when you are cross compiling.

> We should really use our own on platforms that deprecate it: err/errx and 
> warn/warnx are really sweet interfaces.

Agreed.. I had some problems porting basic stuff such as BSD getopt() to
HelenOS because the printf subsystem was still young, but that's a
corner case.

i.e. static char *warning = "foo on %s failed at line %d";
...

printf(warning, somevar, __LINE__);


Most people will be using a modern and fully functional C library.

> ccan/err?

ccan/ccan_err would be better, err is kind of generic.

Cheers,
--Tim





More information about the ccan mailing list