help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem compiling position.hh with Microsoft C++


From: Moss, Jeff
Subject: Problem compiling position.hh with Microsoft C++
Date: Wed, 22 Dec 2004 11:56:38 -0500

I've been trying to implement a very simple grammar using Bison 1.875e
and Microsoft Visual C++ 6.0.  I have run into an issue that you may want
to know about.

There is a bug in the Microsoft compiler with respect to initialization of
static const int member data.  In particular in position.hh I had to remove
the initialization from the following two variables.

    /** \brief Initial column number. */
    static const unsigned int initial_column = 0;
    /** \brief Initial line number. */
    static const unsigned int initial_line = 1; 

Then I added the initialization after the class.

  /* Fix for Microsoft compiler */
  const unsigned int Position::initial_column = 0;
  const unsigned int Position::initial_line = 1;


  Regards
  Jeff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]