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]
Other format: [Raw text]

Re: [C++ RFC / patch] PR 32674


Hi Mark,

Here's what I think is happening.  We use a TREE_LIST to represent an
initializer before we do very much semantic analysis.  After all, for
something like:

S s(3, 4, 6);

we have three arguments; that turns out to be an initializer.

So, does the test case work if you say:

... A<N>::i = C::j;

?


Indeed, it works!

If so, then when INIT is a TREE_LIST, then I think that we should
fold_non_dependent_expr each of the elements separately (instead of just
calling init = fold_non_dependent_expr).  Then, hopefully, the rest of
the routine will issue an error about:

... A<N>::i = (C::j, 7, 3);

for example.


Ok, I'll try to work along these lines and report back as soon as possible.

Thanks,
Paolo.


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