[ ant-contrib-Bugs-1690945 ] ant-cc task doesn't fully support msvc8 without warnings
"SourceForge.net" <[email protected]> Wed, 22 Aug 2007 13:32:00 -0700
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1690945, was opened at 2007-03-29 22:48
Message generated for change (Settings changed) made by darius42
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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: David Haney (darius42)
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: David Haney (darius42)
Date: 2007-08-22 20:31
Message:
Logged In: YES
user_id=1140024
Originator: NO
Committed patch 1776565 in svn revision 138.
----------------------------------------------------------------------
Comment By: David Haney (darius42)
Date: 2007-08-17 20:30
Message:
Logged In: YES
user_id=1140024
Originator: NO
I've uploaded a patch to address this issue (1776565).
The patch modifiers the existing msvc definition so that the debug flags
are added via a member method, and adds a derived msvc8 definition that
overrides the member method to use the /RTC1 value instead of /GZ. There
are also additional unit tests to verify that the correct value is returned
for each compiler definition.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2007-08-16 20: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 22: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/