OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [arg9.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do assemble  }
// { dg-do assemble  }
// GROUPS passed arg-matching
// GROUPS passed arg-matching
// arg-matching file
// arg-matching file
// Message-Id: <199405132049.QAA06835@elan.cs.UMD.EDU>
// Message-Id: <199405132049.QAA06835@elan.cs.UMD.EDU>
// Subject: Bug in g++ 2.4.5 and 2.5.8
// Subject: Bug in g++ 2.4.5 and 2.5.8
// Date: Fri, 13 May 1994 16:49:22 -0400
// Date: Fri, 13 May 1994 16:49:22 -0400
// From: Evan Rosser 
// From: Evan Rosser 
#include 
#include 
#include 
#include 
#include 
#include 
class TupleIterator {
class TupleIterator {
public:
public:
    TupleIterator(int *tpl);
    TupleIterator(int *tpl);
    int& operator*();
    int& operator*();
    int  live() const;
    int  live() const;
// The compile fails with "no post-increment operator for type" at "TI++"
// The compile fails with "no post-increment operator for type" at "TI++"
// below.
// below.
// It succeeds with the same declarations if set_position does not take an int.
// It succeeds with the same declarations if set_position does not take an int.
// This occurs with G++ 2.4.5 and 2.5.8.
// This occurs with G++ 2.4.5 and 2.5.8.
// Sun CC works OK with either case.
// Sun CC works OK with either case.
        void operator++(int);
        void operator++(int);
        void set_position(int);
        void set_position(int);
private:
private:
};
};
int main() {
int main() {
int t[5];
int t[5];
t[1] = 1; t[2] = 2;t[3] = 3;t[4] = 4;
t[1] = 1; t[2] = 2;t[3] = 3;t[4] = 4;
TupleIterator TI(t);
TupleIterator TI(t);
    while(TI.live()){
    while(TI.live()){
        printf("%d", *TI);
        printf("%d", *TI);
        TI++;
        TI++;
    }
    }
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.