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]

[Bug c++/14585] Internal compiler error


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-15 17:47 -------
Fixed for 3.0.4, the person reported it against 2.95.4.
Here is the reduced source:
#include <string>
typedef unsigned int uint32_t;
typedef unsigned char uint8_t;
class Fifo
{
  private:
    static const uint32_t maxsize;
    uint32_t readpos;
    uint32_t writepos;
    uint32_t occupation;
    static const int WARNING_ALMOST_EMPTY;
    static const int WARNING_ALMOST_FULL;
    static const int CORRECT;
    uint8_t datas[maxsize];
  public:
    Fifo ();
    ~Fifo ();
    int getStatus (void) const;
    bool write (uint8_t *data, int size);
    bool read (uint8_t *data, int size);
};
int main()
{
 Fifo fifo;
 std::string t;
}

This is invalid as maxsize is not constant at all.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|                            |ice-on-invalid-code
         Resolution|                            |FIXED
   Target Milestone|---                         |3.0.x
            Version|3.0.4                       |2.95.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14585


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