develooper Front page | perl.perl6.internals | Postings from December 2001

[PATCH] Optimization warning on Win32.

Thread Next
From:
Jason Diamond
Date:
December 31, 2001 13:19
Subject:
[PATCH] Optimization warning on Win32.
Message ID:
010601c19240$d954cc60$6401a8c0@injektilo
The default flags for cl.exe includes the -O1 option which enables
optimizations. Unfortunately, the Standard Edition of Visual Studio doesn't
support that option so outputs a warning each time we compile. The attached
patch removes the -O1 option if it detects that the compiler is the Standard
Edition. I made a slight fix to Configure.pl while I was at it. It turns out
that eval can return undef even if there was no error so it's not safe to
say 'eval $foo or die $@;'. Instead, we should say 'eval $foo; die $@ if
$@;' since eval guarantees that $@ will be a null string if there was no
error.

Jason.



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