Volker,

 > When compiling with C++, nested structs lead to nested class definitions 
 > which
 > are not compatible. I am aware that this would be a huge change in Samba4, 
 > but
 > I would like to see it in the code that is shared.

this may be a step too far. C and C++ are different languages, and
while it is useful to be able to get warnings from g++ is nice, I
don't think it should lead us to worse coding practices. Nesting
structure definitions keeps structure definitions cleaner, and keeps
related structures closer together.

Do you actually have plans to use real C++ somewhere with the Samba
code, or is this purely for the warnings?

Perhaps it might gain more to put some effort into adapting sparse for
warnings that are applicable to Samba code? It is a much more powerful
static analyser than g++ ever will be, and doesn't require a change of
language :-)

Cheers, Tridge

Reply via email to