bug-bison
[Top][All Lists]
Advanced

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

Re: Bison & C++


From: Hans Aberg
Subject: Re: Bison & C++
Date: Thu, 13 Dec 2001 19:07:53 +0100

At 13:38 +0100 2001/12/13, Axel Kittenberger wrote:
>> if T() is calling alloca, the allocation will be in the call of T(), and
>> not when it has expired. This could be circumvented if T() is inlined, but
>> currently there is no way in C++ to ensure that a function is becoming
>> inlined.
>
>You can use old fashioned macros, they are guaranteed to be inlined (of
>course)

How does not look, if you want have
    class T {
      A* a;
    public:
      inline T(size_t n) { a = (A*)alloca(sizeof(A)*n); }
    };
and in
    T t(n);
wants to guarantee that T(n) is inlined?

  Hans Aberg





reply via email to

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