git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Forward declaration of enum iterator_selection?
@ 2016-08-05 22:26 Johannes Sixt
  2016-08-07 20:34 ` Ramsay Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Sixt @ 2016-08-05 22:26 UTC (permalink / raw)
  To: Michael Haggerty; +Cc: Git Mailing List

When refs.c is being compiled, the only mention of enum 
iterator_selection is in this piece of code pulled in from 
refs-internal.h (have a look at the preprocessed code):

typedef enum iterator_selection ref_iterator_select_fn(
		struct ref_iterator *iter0, struct ref_iterator *iter1,
		void *cb_data);

This looks like a forward declarations of an enumeration type name, 
something that I thought is illegal in C. Am I wrong? (That may well be 
the case, my C-foo is quite rusty.)

My compiler does not complain (it's gcc 4.8), but I thought I mention it 
before someone with a pickier compiler stumbles over it...

-- Hannes

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

end of thread, other threads:[~2016-08-10 22:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05 22:26 Forward declaration of enum iterator_selection? Johannes Sixt
2016-08-07 20:34 ` Ramsay Jones
2016-08-08 16:30   ` Johannes Sixt
2016-08-08 18:28     ` Ramsay Jones
2016-08-08 18:52       ` Ramsay Jones
2016-08-10 22:46     ` Michael Haggerty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).