Re: Automatically generate variables



Keith Thompson <kst-u@xxxxxxx> wrote:

Beej Jorgensen <beej@xxxxxxx> writes:
7.1.2 paragraph 3:

If a file with the same name as one of the above < and > delimited
sequences, not provided as part of the implementation, is placed in
any of the standard places that are searched for included source
files, the behavior is undefined.

Interesting. That says that if I place a "stdlib.h" file in one of
the places searched for a
#include "stdlib.h"
directive but *not* for a
#include <stdlib.h>
directive, then the behavior is undefined. I suspect that wasn't the
intent.

I suspect that the intent was that if you place a new stdlib.h in one of
the <> places, you're effectively creating a new C _implementation_, not
a new C source program. If you place a stdlib.h in one of the "" places,
you're doing the latter, trying to create a different program in C, but
one that has undefined behaviour.

Richard
.