# HG changeset patch # User David A. Holland # Date 1370914499 14400 # Node ID 7e4723d3424842d1e4fe8974beaa6dc1e052b077 # Parent 3e505c16b0b08ff9405847e3d75b59ec7e2be734 Complain only about non-identical redefinitions of macros. diff -r 3e505c16b0b0 -r 7e4723d34248 macro.c --- a/macro.c Mon Jun 10 21:33:31 2013 -0400 +++ b/macro.c Mon Jun 10 21:34:59 2013 -0400 @@ -445,18 +445,25 @@ if (oldm != NULL) { ok = macro_eq(m, oldm); if (ok) { + /* in traditional cpp this is silent */ + //complain(&m->defplace, + // "Warning: redefinition of %s", m->name); + //complain(&oldm->defplace, + // "Previous definition was here"); + //if (mode.werror) { + // complain_fail(); + //} + } else { complain(&m->defplace, - "Warning: redefinition of %s", m->name); + "Warning: non-identical redefinition of %s", + m->name); + complain(&oldm->defplace, + "Previous definition was here"); + /* in traditional cpp this is not fatal */ if (mode.werror) { complain_fail(); } - } else { - complain(&m->defplace, - "Redefinition of %s is not identical", - m->name); - complain_fail(); } - complain(&oldm->defplace, "Previous definition was here"); macro_destroy(m); return; }