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

Re: C++ PATCH: Fix PR 288


>>>>> "Doug" == Doug Gregor <gregod@cs.rpi.edu> writes:

    Doug> This isn't a problem specific to the typeof extension,
    Doug> however. Consider a similar code snippet with the same
    Doug> problem:

    Doug> struct S { int i; static const int s = sizeof(S::i); };

    Doug> In general, the typeof extension need not be semantically
    Doug> different from sizeof, but is many times more useful.

I'm not sure exactly what point you're trying to make. :-)

That use of `sizeof' isn't legal either, IIRC.

However, maybe you're arguing that the `typeof' language extension is
a good one, relative to some other language extensions?  That could
well be.  Your example is indeed compelling.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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