libX11: fixing public headers?
dickey at radix.net
Mon Apr 2 08:01:59 PDT 2007
On Mon, Apr 02, 2007 at 08:49:19AM -0600, Brian Paul wrote:
> Keith Packard wrote:
> >On Sun, 2007-04-01 at 11:50 +0200, Tilman Sauerbeck wrote:
> >>What does everyone think about adding "const" there?
> >C programs may end up generating extra warnings, but C++ programs may
> >start to fail to compile.
> >>Can/should we do that?
> >I guess the question is what bugs we expect to uncover by eliciting
> >additional compiler warnings and errors. If we expect these are being
> >mis-used, it would be a good thing. However, if we just end up breaking
> >a lot of otherwise correct code, it doesn't seem like a good plan.
> I think adding const qualifiers to function parameters is generally
> safe. But adding a const qualifier to a returned pointer might cause
> problems, as Keith alluded to.
Adding a const in a struct can also cause problems.
(Modifying a return-type more often than not causes problems).
Thomas E. Dickey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 228 bytes
Desc: not available
More information about the xorg