From: Darin Adler (darin_at_[hidden])
Date: 2001-10-24 23:20:58
on 10/24/01 8:37 PM, Ross Smith at r-smith_at_[hidden] wrote:
> For me, the main reason I normally use unsigned types for counters
> (although I admit this probably isn't relevant to shared_ptr) is to
> avoid GCC's warnings about signed-vs-unsigned comparisons in code like
> the above (if n was a signed type, GCC would complain about the assert).
Good point. I must admit that I do that for the same reason.
> (Because I write a lot of cross-platform code that needs to work with
> multiple compilers, I tend to be paranoid about standards compliance and
> portability, and I have a firm rule that all my code must compile with
> g++ -ansi -pedantic -W -Wall -Werror.)
I use a few more warnings than that for similar reasons. Typically I also
include -Wchar-subscripts, -Wmissing-declarations, -Wmissing-prototypes,
-Wcast-align, -Wpointer-arith, and -Wnested-externs.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk