Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Gabriel Dos Reis
"Giovanni Bajo" <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis <[EMAIL PROTECTED]> wrote: | | >> Fixing a PR introducing a regression is not a proper fix for any bug, | >> *especially* for a bug which is not a regression itself. | > | > Thanks for the lecture. | > | > Not just because this is not

Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Giovanni Bajo
Gabriel Dos Reis <[EMAIL PROTECTED]> wrote: >> Fixing a PR introducing a regression is not a proper fix for any bug, >> *especially* for a bug which is not a regression itself. > > Thanks for the lecture. > > Not just because this is not a regression does not mean it does not > need fixing. I jus

Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Gabriel Dos Reis
"Giovanni Bajo" <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis <[EMAIL PROTECTED]> wrote: | | > Once I'm finished, I'll post the patch and I would probably ask you | > help in the testing department and suggest better concrete | > solution. That PR needs to be fixed. | | | Fixing a PR introduci

Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Giovanni Bajo
Gabriel Dos Reis <[EMAIL PROTECTED]> wrote: > Once I'm finished, I'll post the patch and I would probably ask you > help in the testing department and suggest better concrete > solution. That PR needs to be fixed. Fixing a PR introducing a regression is not a proper fix for any bug, *especially*

Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Gabriel Dos Reis
"Giovanni Bajo" <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis <[EMAIL PROTECTED]> wrote: | | > template struct X { }; | > | >void fu(int a, X) { } // #1 | | I gave a look to PR 17395 and you are probably right. This testcase requires | us to build PARM_DECLs even for function decla

Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Giovanni Bajo
Gabriel Dos Reis <[EMAIL PROTECTED]> wrote: > template struct X { }; > >void fu(int a, X) { } // #1 I gave a look to PR 17395 and you are probably right. This testcase requires us to build PARM_DECLs even for function declarations. That's really too bad. You should though measure me

Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Gabriel Dos Reis
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: [...] | | > The obvious place is on the DECL_INITIAL of the PARM_DECLs, but I | | > don't think they exist until the function is defined. | | | | | | I heard once that there was some long-term project of storing function | | declarations (without co

Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Gabriel Dos Reis
"Giovanni Bajo" <[EMAIL PROTECTED]> writes: | Nathan Sidwell <[EMAIL PROTECTED]> wrote: | | >>> In the C++ front end, default arguments are recorded in | >>> FUNCTION_TYPEs intead of being part of the FUNCTION_DECLs. What are | >>> the reasons for that? | >> | >> | >> There used to be an extens

Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Giovanni Bajo
Nathan Sidwell <[EMAIL PROTECTED]> wrote: >>> In the C++ front end, default arguments are recorded in >>> FUNCTION_TYPEs intead of being part of the FUNCTION_DECLs. What are >>> the reasons for that? >> >> >> There used to be an extension that allowed default arguments on >> function pointer typ

Re: Default arguments and FUNCTION_TYPEs

2005-11-24 Thread Gabriel Dos Reis
Nathan Sidwell <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis wrote: | | > Assuming the extension was gone, do you see a reason we not move the | > default arguments to FUNCTION_DECLs and have FUNCTION_TYPEs use | > TREE_VEC instead of TREE_LIST to hold the parameter-type list? | | you could pro

Re: Default arguments and FUNCTION_TYPEs

2005-11-23 Thread Nathan Sidwell
Gabriel Dos Reis wrote: Assuming the extension was gone, do you see a reason we not move the default arguments to FUNCTION_DECLs and have FUNCTION_TYPEs use TREE_VEC instead of TREE_LIST to hold the parameter-type list? you could probably use a VEC(tree), which I think would be even better :)

Re: Default arguments and FUNCTION_TYPEs

2005-11-23 Thread Nathan Sidwell
Mark Mitchell wrote: Gabriel Dos Reis wrote: Hi, In the C++ front end, default arguments are recorded in FUNCTION_TYPEs intead of being part of the FUNCTION_DECLs. What are the reasons for that? There used to be an extension that allowed default arguments on function pointer types. We ag

Re: Default arguments and FUNCTION_TYPEs

2005-11-23 Thread Mark Mitchell
Gabriel Dos Reis wrote: > Assuming the extension was gone, do you see a reason we not move the > default arguments to FUNCTION_DECLs and have FUNCTION_TYPEs use > TREE_VEC instead of TREE_LIST to hold the parameter-type list? Both things sound OK to me. -- Mark Mitchell CodeSourcery, LLC [EMAIL

Re: Default arguments and FUNCTION_TYPEs

2005-11-23 Thread Gabriel Dos Reis
Mark Mitchell <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis wrote: | > Hi, | > | > In the C++ front end, default arguments are recorded in | > FUNCTION_TYPEs intead of being part of the FUNCTION_DECLs. What are | > the reasons for that? | | There used to be an extension that allowed default

Re: Default arguments and FUNCTION_TYPEs

2005-11-23 Thread Mark Mitchell
Gabriel Dos Reis wrote: > Hi, > > In the C++ front end, default arguments are recorded in > FUNCTION_TYPEs intead of being part of the FUNCTION_DECLs. What are > the reasons for that? There used to be an extension that allowed default arguments on function pointer types. We agreed to kill it,