This is the mail archive of the
mailing list for the GCC project.
Re: why are we not using const?
- From: "Manuel LÃpez-IbÃÃez" <lopezibanez at gmail dot com>
- To: "Andrew Haley" <aph at redhat dot com>
- Cc: gcc at gnu dot org
- Date: Tue, 27 Jun 2006 14:29:58 +0100
- Subject: Re: why are we not using const?
- References: <firstname.lastname@example.org> <email@example.com>
On 27/06/06, Andrew Haley <firstname.lastname@example.org> wrote:
Well, const functions are nonstandard, and gcc itself is written in
Standard C so they can't be used. But As for const args, I can't see
any good reason not to use them, and there are 400 uses in gcc.
I meant const arguments, sorry for the confusion. What about: 'const'
applied to trees, for example:
void foo(const tree type, const tree expr)
Perhaps there is some drawback there?