[DGD]redefining macros

Felix A. Croes felix at dworkin.nl
Sun Apr 25 20:49:30 CEST 1999


Serhat Sakarya <serhat at freud.et.tudelft.nl> wrote:

> a coder on my mud had a problem with redefinitions of macros.. for
> example, the following doesn't compile (in DGD 1.1.49):
>
> #define FOO 1

# undef FOO

> #define FOO 2
>
> I've looked at the src/lex/macro.c code and found the part where the error
> is generated:  'warning("macro %s redefined", name);'
>
> So.. my question is: if I want to allow redefinitions, is it safe to
> remove the warning and.. why is 'warning' defined as 'c_error'?

It's only a warning if you compile the preprocessor as a stand-alone
program, and it's safe to remove it -- though I don't think you gave
a good reason for doing so.

Regards,
Dworkin

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list