develooper Front page | perl.perl5.porters | Postings from July 2000

Re: [ID 20000628.002] HPUX 11: -Ae compiler flag breaks perl -P

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
July 31, 2000 11:14
Subject:
Re: [ID 20000628.002] HPUX 11: -Ae compiler flag breaks perl -P
Message ID:
20000730135719.A10753@chaos.wustl.edu
> -----------------------------------------------------------------
> The file hints/hpux.sh recommends using the -Ae flag with the HPUX C compiler.  On my system, this flag causes "perl -P" to break because it removes C++-style comments:
> 
> s/foo//g;
> 
> becomes
> 
> s/foo
> 
> To get around this, use the following flags for preprocessing:  either "cc -Aa -E", which enforces strict ANSI compliance; or "cc -Ae -C -E", which leaves comments intact in the output file.  The comments in hpux.sh should be updated, at the very least.
> -----------------------------------------------------------------

-C doesn't quite "leave comments intact":

$ cat x.c
s/foo//;
$ cc -Ae -E -C x.c
# 1 "x.c"
s/foo/*; */
$ 

And -Aa doesn't work with a couple of features, like large files and the
LL suffix for long longs.

I cannot see an easy way out.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About