This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: extern modifier on function declarations
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 9 Dec 2016 09:22:44 +0000
- Subject: Re: extern modifier on function declarations
- Authentication-results: sourceware.org; auth=none
- References: <9c9c81880b49120bf90766fce93503ac@simark.ca>
On 16-12-08 10:45:10, Simon Marchi wrote:
> Hi gdb-patches,
>
> Our coding style currently requires using the "extern" keyword on
> function declarations. How relevant is this today?
>
> I am not good at reading standards, but it is my impression that in
> C++, functions are always extern unless they are declared static. I
> am sure some people here know that answer already.
>
> If it's not useful anymore, I would suggest dropping it for future
> patches. It doesn't change much, just a bit less verbosity and line
> wrapping.
I'd like to keep "extern", with respect to consistency. As we move to
C++, I don't expect many new function declarations, instead, I expect
more classes are added and used. Even some existing code can be
converted to classes. In the long term, there should be less and less
function declarations.
--
Yao (齐尧)