Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* extern modifier on function declarations
@ 2016-12-08 15:45 Simon Marchi
  2016-12-09  9:23 ` Yao Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Marchi @ 2016-12-08 15:45 UTC (permalink / raw)
  To: gdb-patches

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.

Simon


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: extern modifier on function declarations
  2016-12-08 15:45 extern modifier on function declarations Simon Marchi
@ 2016-12-09  9:23 ` Yao Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Yao Qi @ 2016-12-09  9:23 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

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 (齐尧)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-09  9:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08 15:45 extern modifier on function declarations Simon Marchi
2016-12-09  9:23 ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox