You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by "Sluis, Minto van der" <Mi...@isc.politie.nl> on 2004/12/13 16:03:32 UTC
Removing trailing semicolon for namespaces.
Hi,
I tried to compile log4cxx for for tru64 using the compaq compiler.
Unfortunately I ran into a lot of compiler errors. Below is a script
to resolve a few of the errors. This script strips the trailing semi-
colon from namespace declarations.
for f in `find . -name "*.h"`; do
cp $f $f.original
sed -e "s/}; \/\/name/} \/\/ name/g" -e "s/}; \/\/ name/} \/\/
name/g" $f > $f.modified
mv $f.modified $f
done
For instance:
namespace log4cxx
{
...
}; // namespace
and
namespace log4cxx
{
...
}; //namespace
gets converted to:
namespace log4cxx
{
...
} // namespace
Many compilers do not mind the additional semi-colon, however since
building on tru64 automatically turns on strict ansi. This is results
is a lot of errors (warnings if strict ansi is turned of). Compile
output looks much cleaner with the semi-colons gone.
cheers,
Minto van der Sluis
Re: Removing trailing semicolon for namespaces.
Posted by Tommi Maekitalo <to...@epgmbh.de>.
Hi,
gcc version 3.4 with -pedantic complains about it. gcc 3.3 with -Wall and
-pedantic is silent about it.
Tommi
Am Mittwoch, 15. Dezember 2004 01:44 schrieb Curt Arnold:
> On Dec 13, 2004, at 9:03 AM, Sluis, Minto van der wrote:
> > Hi,
> >
> > I tried to compile log4cxx for for tru64 using the compaq compiler.
> > Unfortunately I ran into a lot of compiler errors. Below is a script
> > to resolve a few of the errors. This script strips the trailing semi-
> > colon from namespace declarations.
>
> I logged this as http://nagoya.apache.org/jira/browse/LOGCXX-46. I
> didn't succeed using your script but think that I accomplished the same
> thing manually. I couldn't find a gcc setting that would make it
> strict on trailing semicolons, but I think I got them all. Let me know
> if I missed any.
Re: Removing trailing semicolon for namespaces.
Posted by Curt Arnold <ca...@apache.org>.
On Dec 13, 2004, at 9:03 AM, Sluis, Minto van der wrote:
> Hi,
>
> I tried to compile log4cxx for for tru64 using the compaq compiler.
> Unfortunately I ran into a lot of compiler errors. Below is a script
> to resolve a few of the errors. This script strips the trailing semi-
> colon from namespace declarations.
I logged this as http://nagoya.apache.org/jira/browse/LOGCXX-46. I
didn't succeed using your script but think that I accomplished the same
thing manually. I couldn't find a gcc setting that would make it
strict on trailing semicolons, but I think I got them all. Let me know
if I missed any.