
#including your #include....
Quote:
> Thanks for listening.
> I made a small change to my current project the other day,
> and when I went to compile, the hard drive just sat
> there churning away. I stopped it after a couple of minutes
> (usually takes about 10 seconds), and I discovered that I
> had a #include with the file of the same name, i.e.
> in file blah.h #include "blah.h"
> Shouldn't the compiler pick this up?
> zuf.
Not really. Perhaps after a given recursion level, the compiler could say
something like - oops... #includes nested too deeply. The reason I say this
is that I actually _USE_ recursive self-inclusion to force pre-declaration of
data structures so that on the second/third/whatever #include pass, I can
create an alignment filler at the bottom of the _real_ structure definition
that causes the whole structure to occupy a natural alignment boundary.
I realize that this is totally {*filter*}, but there seems to be no other
immediately apparent way to accomplish that goal.
David G. North, CCP
"The squeaking wheel doesn't always get the grease. Sometimes it gets replaced."