C++: int stack[] cannot be declared global

Manoj Rajagopalan ma... at nanorex.com
Thu Feb 14 22:50:10 UTC 2008

Hi Adrian,

   This causes a clash with std::stack that comes with some STL 
packages. On my Fedora 8 machine with gcc v4.1.2 and libstdc++ v4.1.2, I 
get errors like the following:

mmp-parser.rl:187: error: reference to ‘stack’ is ambiguous
mmp-parser.rl:215: error: candidates are: int stack [1000]
error:                 template<class _Tp, class _Sequence> class std::stack

   Any suggestions? Would I be too bold in suggesting that the stack 
variable in ragel be renamed to something like ragelstack?


More information about the ragel-users mailing list