[kelbt-users] nonterm class Foo
Elijah Epifanov
elijah.epifanov at gmail.com
Mon Jan 12 19:25:39 UTC 2009
bugreport:
when using 'nonterm class Foo' construct the generated parser uses
placement new operator:
%%
case 1: {
new(redLel->user.E) Parser_Lel_E();
%%
however, (at least on my system) placement new cannot be used without
#inclding <new>.
%%
calc2.cpp: In function 'int parseLangEl(int, const Token*)':
calc2.cpp:653: error: no matching function for call to 'operator
new(long unsigned int, char [8])'
<built-in>:0: note: candidates are: void* operator new(long unsigned int)
%%
This happens on:
Debian sid/exp:
libc6-dev 2.7-18
g++ (Debian 4.3.2-2) 4.3.3 20090110 (prerelease)
MacOS X (macports 1.700):
g++ (GCC) 4.0.1 (Apple Inc. build 5490)
g++ (GCC) 4.2.1 (Apple Inc. build 5566)
g++ (GCC) 4.3.2
g++ (GCC) 4.4.0 20081128 (experimental)
Fix is very simple - #include <new>
More information about the kelbt-users
mailing list