[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ecos-bugs
Subject:    [Bug 1000636] tests/tm_basic.cxx: bad definition for max()
From:       bugzilla-daemon () ecoscentric ! com
Date:       2008-11-14 9:59:37
Message-ID: 20081114095937.580003B40069 () mail ! ecoscentric ! com
[Download RAW message or body]

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000636





--- Comment #3 from David Tylski <david.tylski@parrot.com>  2008-11-14 09:59:36 ---
There are 2 potential ones:
- if max() is defined elsewhere (but with the right definition)... in that
case, for each
    xxx = max(boundary, xxx);
the value will be set to the boundary (which is different from testing using
the initial xxx value).
- if anytime later, you want to use max() to get some statistics of your tests,
you may not even notice that your results are wrong.

To be sure, the definition of max() could also be "sanity protected".
#ifdef max
#error max already defined!
#else
#define max(n,m) (m > n ? n : m)
#endif

The bug initially comes from the use of max() for sanity checks, while min()
should instead be used; max() not being defined, it is defined in the .cxx
source, whatever the standard max() function.

However I noticed that this little fix will never be scheduled.


-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic