COIN-OR::LEMON - Graph Library

Opened 16 years ago

Closed 16 years ago

#208 closed defect (fixed)

Suppress or fix VS2008 warnings

Reported by: Alpar Juttner Owned by: Alpar Juttner
Priority: major Milestone: LEMON 1.1 release
Component: core Version: hg main
Keywords: Cc:
Revision id:

Description

The attached patch ([94e3cf7b7fb4]) fixes all of the warnings emitted by VS2008. In fact, most of them have been solved by suppressing the following warnings.

  • C4250: 'class1' : inherits 'class2::member' via dominance
  • C4355: 'this' : used in base member initializer list
  • C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
  • C4996: 'function': was declared deprecated

But there was also an essential bug: it may happen in C++ that something you intend to be a class allocation, is syntactically a function declaration. You can read more about this problem here. It is worth reading.

Finally, the patch also turns off adaptors_test and edge_set_test in CMake, for they currently do not compile with VS2008.

Could someone check [94e3cf7b7fb4] compiles with VS2005?

Attachments (1)

94e3cf7b7fb4.patch (3.0 KB) - added by Alpar Juttner 16 years ago.

Download all attachments as: .zip

Change History (3)

Changed 16 years ago by Alpar Juttner

Attachment: 94e3cf7b7fb4.patch added

comment:1 in reply to:  description ; Changed 16 years ago by Alpar Juttner

Replying to alpar:

The attached patch ([94e3cf7b7fb4]) fixes all of the warnings emitted by VS2008. In fact, most of them have been solved by suppressing the following warnings.

Currently, it is done by a conditional #pragma line, but it might be better to pass /wdn switches to the VS compiler by the CMAKE configuration.

comment:2 in reply to:  1 Changed 16 years ago by Alpar Juttner

Resolution: fixed
Status: newclosed

Replying to alpar:

Currently, it is done by a conditional #pragma line, but it might be better to pass /wdn switches to the VS compiler by the CMAKE configuration.

This version went to the main branch, see [e6ae4999cf22].

I also backported the applicable parts to the 1.0 branch, see [2b6a20528f35].

Note: See TracTickets for help on using tickets.