[PATCH] D16171: Warning on redeclaring with a conflicting asm label
Joerg Sonnenberger via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 14 15:24:51 PST 2016
On Thu, Jan 14, 2016 at 03:05:26PM -0800, Zhao, Weiming via cfe-commits wrote:
> I agree what you said about different code generated with clang and GCC
> generates. In this case, we should throw an error (err_late_asm_label).
> But in this example, there is no use of the function. They are just
> redundant declarations and there is no actual code generated.
> So I suggest we just give warnings for this case. Otherwise, it will break
> existing code like some SPEC benchmarks.
By the same argument, redefinitions with different types should be valid
in C. I don't like this slippery slope at all, code should really be
just fixed here.
More information about the cfe-commits