axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: cvs commit: xml-axis/c/src/engine SharedObject.h SharedObject.cpp SessionScopeHandlerPool.h SessionScopeHandlerPool.cpp SerializerPool.h SerializerPool.cpp RequestScopeHandlerPool.h RequestScopeHandlerPool.cpp DeserializerPool.h DeserializerPool.cpp AppScopeHandlerPool.h AppScopeHandlerPool.cpp Main.c HandlerPool.h HandlerPool.cpp HandlerLoader.h HandlerLoader.cpp HandlerChain.h HandlerChain.cpp AxisEngine.h AxisEngine.cpp Axis.cpp
Date Thu, 14 Aug 2003 19:08:24 GMT
Sam Lang wrote:
> During the compile process for AxisC++, I'm getting a bunch of warnings
> from the headers:
> warning: no newline at end of file
> g++ gives this warning, but VC++ doesn't.  Because C++ compilers can
> differ dramatically across platforms, it might be worthwhile to have a
> set of C++ coding guidelines, to ensure this kind of problem doesn't
> happen.  The mozilla project has a set of guidelines for this purpose:
> which addresses the above problem:
> --snip--
> 10. Put a new line at end-of-file
> Not having a new-line char at the end of file breaks .h files with the
> Sun WorkShop compiler and it breaks .cpp files on HP.
> --snip--
> I would recommend adopting their guidelines, or coming up with your own.

I am +1 for x-platform code standards, but IMO the Mozilla ones are 
outdated or driven by support for obscure platforms & C++ compilers. 
Things have improved, not least because gcc is the defacto standard for 
everything but Windows.

My windows-linux-macosX code works with
-modern ISO C++: wchar_t is a type, for(int i=0) {} scopes I to the 
forloop, etc.
-unicode everywhere
-no C style casts. dynamic_cast, reinterpret_cast, const_cast, etc.
-STL datastructures. The 2003 is still buggy here *of course*
-all exceptions derive from std::exception

I'd drop 1,3,4,5,19 from the list, retain the rest, even #2, which is 
not as critical as it used to be, but still good practice -as you cannot 
predict the order things get constructed.

View raw message