This is the mail archive of the gcc@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]

Re: Can PR c++/3905 (sizeof on function call in template) be doneon 3.2.x?


Michael Matz wrote:

Okay, my question is: how much work would this be for a more experienced
C++ frontend hacker (like someone who, uhm, at least knows where to look
at ;-) ) to do, and is this feasible at all?

----------------------
template <class T>
struct S
{
        static int foo (void);
        enum { val = sizeof (foo()) };
};

int main () { return S<char>::val; }
----------------------


I think this patch is the one you want :)


http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01597.html

The message is messed up when displayed but extracting the patch from HTML
source should be fine.  I'm not sure if the patch applies cleanly.

--Kriang



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