Gabriel Dos Reis - Re: Default arguments and FUNCTION_TYPEs (original) (raw)
This is the mail archive of the gcc@gcc.gnu.orgmailing 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] |
- From: Gabriel Dos Reis
- To: "Giovanni Bajo"
- Cc: "Nathan Sidwell" , , "Mark Mitchell" , "Jason Merrill"
- Date: 24 Nov 2005 10:35:25 +0100
- Subject: Re: Default arguments and FUNCTION_TYPEs
- References: <m3y83eq3oz.fsf@uniton.integrable-solutions.net> <43850DC6.8010604@codesourcery.com> <438572BF.2000602@codesourcery.com> <030601c5f0d7$c0a9b730$4c432597@bagio>
"Giovanni Bajo" giovannibajo@libero.it writes:
| Nathan Sidwell nathan@codesourcery.com 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 types. We agreed to kill it, although I don't know | >> if it was actually removed. If that's been done, there's no longer | >> any reason. | > | > I took it out the back and shot it. | > | > 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 corresponding definitions) in a more memory-efficient | memory representation. Moving default parameters within PARM_DECL seems a | little backward in this respect. And if your memory is right, requiring to | build PARM_DECLs just to store default arguments would be even worse.
I don't see why, it is backward -- we still need to build the PARM_DECLs default arguments or not. Anyway, I'm in the middle of coding that suggestion, so I would appreciate a better concrete representation.
-- Gaby
- Follow-Ups:
- Re: Default arguments and FUNCTION_TYPEs
* From: Gabriel Dos Reis - Re: Default arguments and FUNCTION_TYPEs
* From: Giovanni Bajo
- Re: Default arguments and FUNCTION_TYPEs
- References:
- Default arguments and FUNCTION_TYPEs
* From: Gabriel Dos Reis - Re: Default arguments and FUNCTION_TYPEs
* From: Mark Mitchell - Re: Default arguments and FUNCTION_TYPEs
* From: Nathan Sidwell - Re: Default arguments and FUNCTION_TYPEs
* From: Giovanni Bajo
- Default arguments and FUNCTION_TYPEs
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |