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]

[C++] NEW_EXPR and PR c++/11406


I've been looking into PR c++/11406 which has mostly to do with
NEW_EXPR construction at parse-time.  NEW_EXPR is probably one of the
few undocumented trees in doc/c-tree.texi.

Consider:

    template <int> struct S{};

    template <int N> S<sizeof(new double[N])> f () {}   // #3

    template S<4> f<2>();

for the new-expression at line #3, the parser seems to be building

    NEW_EXPR (NULL,
              TREE_LIST ( ARRAY_REF ( ... ),
              NULL)

where the tree dumper expects

   NEW_EXPR (NULL,
             ARRAY_REF ( ... ),
             NULL)
   
therefore the sorry+ICE.

Is the TREE_LIST to be expected?  That seems a bit odd.

-- Gaby
 


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