This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

friend operator bug


Hello,

Attached you can find a very short code that exhibits (in my opinion) a 
g++ compiler bug. I tried with version 2.96 and 3.2. The latter output is 
attached as file "tmp". Please try:

dresden:~>g++ Test4.C
Test4.C: In function `double Set(const ShortVector<double, 3>&, const 
   ShortVector<double, 3>&)':
Test4.C:39: no match for `const ShortVector<double, 3>& * const 
   ShortVector<double, 3>&' operator

However, a simple change in code (see preprocessor option in Test4.C) 
makes it work fine:

dresden:~>g++ -DNO_BUG Test4.C
dresden:~>a.out
60

Please have a look and see if you could come up with a fix. Otherwise I 
have to put dummy arguments in my simulation code.

Sincerely,

Burkhard

Attachment: Test4.C
Description: Text document

Attachment: tmp
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]