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

List:       kde-bugs-dist
Subject:    Bug#1338: kdebase: Redefinition of MIN leads to compilation error
From:       Stefan.Becker () nmp ! nokia ! com
Date:       1999-05-10 6:05:33
[Download RAW message or body]

package: kdebase
version: 1.1.1
target: hppa2.0-hp-hpux10.20
subdir: konsole/src

The compilation of main.C fails on HP-UX in line 77:

  inline int MIN(int A, int B) { return ((A>B) ? B : A); }

MIN has already been defined as macro so the line is expanded by cpp to:

inline int ((( int A )<(  int B ))?( int A ):(  int B ))  { return ((A>B)
? B : A); }

which of course is junk :-)

Inserting the following lines fixes the problem:

#ifdef MIN
#undef MIN
#endif

But maybe the whole MIN definition should be removed...

Regards,

	Stefan

---
Stefan Becker
E-Mail: Stefan.Becker@nmp.nokia.com

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

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