Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002053graphvizBuild/Installpublic2011-02-15 16:362011-04-28 04:03
ReporterMichael Shields 
Assigned Toerg 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOS*-*-OS Version
Summary0002053: lib/neatogen/sparsegraph.h defines an overloaded function that is extern "C"
Description



When compiled with C++, the max() and min() functions in
lib/neatogen/sparsegraph.h can cause a build error. This is because the
functions are overloaded, but because it is inside an extern "C" block,
name mangling is disabled and so the int and double versions are in
conflict. Even though they are declared inline, they still have external
linkage because the "inline" keyword is only a hint.
Additional Information

[erg]
Applying the patch induces hundreds of errors like

  stringfwd.h:48: error: template with C linkage

which makes sense, since #include <algorithm> is being opened within an extern "C" block.

The easiest thing to do is remove the definitions, since they are relics anyway.
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT 
<CD>
--- a/lib/neatogen/sparsegraph.h
+++ b/lib/neatogen/sparsegraph.h
@@ -37,31 +37,9 @@ extern 'C' {

     typedef int DistType; /* must be signed!! */

- inline double max(double x, double y) {
- if (x >= y)
- return x;
- else
- return y;
FORMER-ID2139
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed (15 Feb 2011)
VERSION     2.26.3
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => erg


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker