[ ant-contrib-Bugs-1690945 ] ant-cc task doesn't fully support msvc8 without warnings

"SourceForge.net" <[email protected]> Thu, 16 Aug 2007 13:16:48 -0700
Newsgroups gmane.comp.java.ant-contrib.devel
Message-ID <[email protected]>
Bugs item #1690945, was opened at 2007-03-29 15:48
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=1690945&group_id=36177

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: cpptasks
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Curt Arnold (carnold)
Summary: ant-cc task doesn't fully support msvc8 without warnings

Initial Comment:
my email: mike dot micucci at roguewave dot com

We use the ant-cc task to compile sources on many different platforms, including MSVC 8.0 (Visual Studio 2005).  The /GX flag was fixed to use /EHsc in the latest version, but the /GZ flag is still used when debug mode is turned on.  This will cause the following warning on VC8:

       [cc] 1 total files to be compiled.
       [cc] cl /EHsc /c /nologo /Zi /Od /GZ /D_DEBUG /MDd /GR  MyFile.cpp
Execute:Java13CommandLauncher: Executing 'cl' with arguments:
'/EHsc'
'/c'
'/nologo'
'/Zi'
'/Od'
'/GZ'
'/D_DEBUG'
'/MDd'
'/GR'
'MyFile.cpp'

The ' characters around the executable and arguments are
not part of the command.
       [cc] cl : Command line warning D9035 : option 'GZ' has been deprecated and will be removed in a future release
       [cc] cl : Command line warning D9036 : use 'RTC1' instead of 'GZ'

These warnings can be problematic for users who wish 100% clean builds (no warnings).  We also can't work around this because the MSVC compiler def automatically sets the /MD or /MDd flags based on the debug flag passed in, so we can't hardcode that to "false" and then just add the correct debug flags, because we'll get the incorrect MSVCRT lib linked in.

The /RTC1 and the /RTCs flags are available on VC7.1, so it may be possible to just use those, although it'd be really cool to get a msvc8 compiler definition in addition to the regular msvc definition, which has all the compatibile flags for vc8.

Thanks!

--Michael Micucci
--Roguewave Software

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2007-08-16 13:16

Message:
Logged In: NO 

Michael Micucci - micucci at roguewave dot com

I agree that using a "msvc8" enum value is a good solution as well.

Thanks!

-- Michael Micucci
-- Senior Software Developer - Roguewave Software


----------------------------------------------------------------------

Comment By: Curt Arnold (carnold)
Date: 2007-03-29 15:58

Message:
Logged In: YES 
user_id=27193
Originator: NO

It is a bit problematic since VC6 doesn't support /RTC1.  Either the
compiler version needs to be sniffed or a distinct compiler enum needs to
distinguish between VC6 and VC8 to avoid the warning.  Likely the best is
to add a new enum for "msvc8".

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=1690945&group_id=36177

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/