Project

General

Profile

Bug #264

Compilation problem with "degree.H" (inline fn defns)

Added by Anna Maria Bigatti over 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Various
Start date:
12 Oct 2012
Due date:
% Done:

100%

Estimated time:
1.00 h
Spent time:

Description

I have a very strange problem compiling the debug2 version.
(indeed it is not related with debugging at all, but with a file I have only in my debug directory!)

It seems that adding

#include "CoCoA/degree.H" 

in some .C files (e.g. PPOrdering.C) causes this compilation error
../../include/CoCoA/utils.H: In function 'int CoCoA::LexCmp3(InputIterator1, InputIterator1, InputIterator2, InputIterator2) [with InputIterator1 = const CoCoA::BigInt*, InputIterator2 = const CoCoA::BigInt*]':
../../include/CoCoA/degree.H:89:   instantiated from here
../../include/CoCoA/utils.H:96: error: no matching function for call to 'cmp(const CoCoA::BigInt&, const CoCoA::BigInt&)'
../../include/CoCoA/ring.H:327: note: candidates are: int CoCoA::cmp(CoCoA::ConstRefRingElem, CoCoA::ConstRefRingElem)
../../include/CoCoA/ring.H:358: note:                 int CoCoA::cmp(CoCoA::ConstRefRingElem, const CoCoA::MachineInt&)


Related issues

Related to CoCoALib - Bug #591: Problem with template instantiation and order of include directivesIn Progress2014-07-16

History

#1 Updated by Anna Maria Bigatti over 11 years ago

  • Category set to Various

#2 Updated by John Abbott over 11 years ago

Try adding (in the right place...)

#include "CoCoA/IntOperations.H" 

#3 Updated by John Abbott almost 11 years ago

  • Subject changed from Compilation problem with "degree.H" to Compilation problem with "degree.H" (inline fn defns)
  • Status changed from New to In Progress
  • Target version set to CoCoALib-0.99534 Seoul14
  • % Done changed from 0 to 10

Why are the ctor and the mem fn FastCmp inline?
Now that the components of the degree vector are BigInt, I doubt that making these fns inline really gains much run speed at all.

MAKE TIMING OF CODE AS IT IS
MAKE CTOR AND FASTCMP not INLINE then COMPARE TIMINGS.
If there is not much penalty, make the fns out of line.

#4 Updated by Anna Maria Bigatti over 10 years ago

  • Target version changed from CoCoALib-0.99534 Seoul14 to CoCoALib-0.99532

#5 Updated by Anna Maria Bigatti almost 10 years ago

  • Target version changed from CoCoALib-0.99532 to CoCoALib-0.99533 Easter14

#6 Updated by John Abbott almost 10 years ago

  • Target version changed from CoCoALib-0.99533 Easter14 to CoCoALib-0.99534 Seoul14

#7 Updated by John Abbott almost 10 years ago

Is this still a problem?

#8 Updated by John Abbott over 9 years ago

@Anna Is this still a problem? I hope not; then we can just terminate the issue.

#9 Updated by Anna Maria Bigatti over 9 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 10 to 100
  • Estimated time set to 1.00 h

No problem has ever occurred to anyone in the last year.
Have we fixed it? can't remember.
Has the compiler changed? don't think so.
....Closing.

#10 Updated by John Abbott over 9 years ago

This seems to be very similar to the issue #591; I believe they are occurrences of the same phenomenon. Added #591 as "related".

Also available in: Atom PDF