Re: [Exim] Using int vs. size_t in Exim

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: michael
CC: exim-users
Subject: Re: [Exim] Using int vs. size_t in Exim
On 9 Apr 2003 michael@??? wrote:

> It turns out that gcc 3.2.2 on different operating systems differs by
> needing -pedantic on some systems to get that warning, which explains
> why I did not see it before (Exim does not use -pedantic).


Sigh. I wish compilers would default to 'all warnings ON'. I will try
-pedantic on my test compiles to see what it throws up. Currently I just
use -Wall.

> Apart from the effort to change this and possibly historical reasons,
> are there reasons why int is used? Any objections to start introducing
> size_t? It could break code that deals with negative object sizes, e.g.
> as a loop pre- or post-condition, so some care is needed.


It's partly "historical", which is a euphemism for my ignorance /
incompetence / laziness. But occasionally there are values where you
need to use -1 for "unset", for example.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.