Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [ob] inferior_thread: Remove "extern" in definition.
@ 2009-03-26 22:06 Doug Evans
  2009-03-27  8:13 ` Pierre Muller
  0 siblings, 1 reply; 4+ messages in thread
From: Doug Evans @ 2009-03-26 22:06 UTC (permalink / raw)
  To: gdb-patches

Hi.

Committed as obvious.

2009-03-26  Doug Evans  <dje@google.com>

	* thread.c (inferior_thread) Remove "extern" in definition.

diff -u -p -r1.106 thread.c
--- thread.c	25 Mar 2009 21:53:10 -0000	1.106
+++ thread.c	26 Mar 2009 21:28:39 -0000
@@ -72,7 +72,7 @@ enum thread_state
   THREAD_EXITED,
 };
 
-extern struct thread_info*
+struct thread_info*
 inferior_thread (void)
 {
   struct thread_info *tp = find_thread_pid (inferior_ptid);


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

* RE: [ob] inferior_thread: Remove "extern" in definition.
  2009-03-26 22:06 [ob] inferior_thread: Remove "extern" in definition Doug Evans
@ 2009-03-27  8:13 ` Pierre Muller
  2009-03-27 13:57   ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2009-03-27  8:13 UTC (permalink / raw)
  To: 'Doug Evans', gdb-patches

I am just very curious here:
why does GCC accept such non-sense?

If it is the implementation, it can't be external at the same time...

Pierre Muller
Pascal language support maintainer for GDB
Still not a proficient C programmer :(


> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Doug Evans
> Envoyé : Thursday, March 26, 2009 10:38 PM
> À : gdb-patches@sourceware.org
> Objet : [ob] inferior_thread: Remove "extern" in definition.
> 
> Hi.
> 
> Committed as obvious.
> 
> 2009-03-26  Doug Evans  <dje@google.com>
> 
> 	* thread.c (inferior_thread) Remove "extern" in definition.
> 
> diff -u -p -r1.106 thread.c
> --- thread.c	25 Mar 2009 21:53:10 -0000	1.106
> +++ thread.c	26 Mar 2009 21:28:39 -0000
> @@ -72,7 +72,7 @@ enum thread_state
>    THREAD_EXITED,
>  };
> 
> -extern struct thread_info*
> +struct thread_info*
>  inferior_thread (void)
>  {
>    struct thread_info *tp = find_thread_pid (inferior_ptid);


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

* Re: [ob] inferior_thread: Remove "extern" in definition.
  2009-03-27  8:13 ` Pierre Muller
@ 2009-03-27 13:57   ` Andreas Schwab
  2009-03-27 17:17     ` Pierre Muller
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2009-03-27 13:57 UTC (permalink / raw)
  To: Pierre Muller; +Cc: 'Doug Evans', gdb-patches

"Pierre Muller" <muller@ics.u-strasbg.fr> writes:

> I am just very curious here:
> why does GCC accept such non-sense?

It's not nonsense, but strict C.

> If it is the implementation, it can't be external at the same time...

"extern" is only about linkage.  In a definition if the linkage is not
static then extern is implicit, but making it explicit is not an error.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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

* RE: [ob] inferior_thread: Remove "extern" in definition.
  2009-03-27 13:57   ` Andreas Schwab
@ 2009-03-27 17:17     ` Pierre Muller
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2009-03-27 17:17 UTC (permalink / raw)
  To: 'Andreas Schwab'; +Cc: 'Doug Evans', gdb-patches

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Andreas Schwab
> Envoyé : Friday, March 27, 2009 12:56 PM
> À : Pierre Muller
> Cc : 'Doug Evans'; gdb-patches@sourceware.org
> Objet : Re: [ob] inferior_thread: Remove "extern" in definition.
> 
> "Pierre Muller" <muller@ics.u-strasbg.fr> writes:
> 
> > I am just very curious here:
> > why does GCC accept such non-sense?
> 
> It's not nonsense, but strict C.

  Sorry, I didn't mean to be offensive.

 
> > If it is the implementation, it can't be external at the same time...
> 
> "extern" is only about linkage.  In a definition if the linkage is not
> static then extern is implicit, but making it explicit is not an error.

Thanks for the explanation,


Pierre Muller
Pascal language support maintainer for GDB





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

end of thread, other threads:[~2009-03-27 16:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-26 22:06 [ob] inferior_thread: Remove "extern" in definition Doug Evans
2009-03-27  8:13 ` Pierre Muller
2009-03-27 13:57   ` Andreas Schwab
2009-03-27 17:17     ` Pierre Muller

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