On Feb 14, 2009, at 11:32 AM, Daniel Dunbar wrote: >> >> I guess it is bad that we don't accept some programs we used to, >> but is this >> really such a bad thing? If this just affects stuff in llvm-test, >> I'm >> inclined to just fix the programs. If this occurs in some large C >> code >> bases, then perhaps we should try to be more lenient. > > I'm just concerned about the number of such programs. It seems like > there might be a good tradeoff in allowing some limited but common > patterns of redefinition which are "safe", with the same diagnostic > perhaps but as a warning. This would still put pressure on the user > but at least allow the code to compile. This seems relatively easy for > us to do, what is the downside?
The problem is that clients of the AST can't make the assumption that a builtin with a specified ID has the expected prototype. GCC doesn't provide this guarantee so all sorts of code has to check that printf has at least 1 argument etc. It is really annoying and leads to crash- on-invalid bugs. I think the workaround of "build with -ffree-standing" is acceptable. -Chris _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
