mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Q] compiler no longer warning about undeclared struct?
@ 2011-07-27 17:57 Guennadi Liakhovetski
  2011-07-28 10:03 ` Bernd Petrovitsch
  0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2011-07-27 17:57 UTC (permalink / raw)
  To: linux-kernel

Hi

I just ran across a driver in the kernel (drivers/media/video/ov2640.c, 
struct ov2640_priv::info), that does something like

struct xx {
	struct yy *y;
};

static void z(void)
{
	struct xx *x;
	void *p;

	x = ...;
	p = ...;
	x->y = p;
}

where "struct yy" is nowhere declared, and the compiler happily swallows 
this... Shouldn't it complain? Didn't it complain before?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

end of thread, other threads:[~2011-07-28 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 17:57 [Q] compiler no longer warning about undeclared struct? Guennadi Liakhovetski
2011-07-28 10:03 ` Bernd Petrovitsch
2011-07-28 10:16   ` Guennadi Liakhovetski
2011-07-28 11:08     ` Andreas Schwab

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

all inboxes | Powered by JetHome®