efriedma added a comment.

> The other side of the problem is, what if the declarations don't have any 
> section information, but the definition does? Is that also an undefined 
> behavior?

I can't see how "undefined behavior" could possibly be the right answer in that 
case.  Every definition has to end up in some section eventually, and in many 
cases we don't know what section that will be when a global is declared.  (For 
example, we put constants into different sections depending on the contents of 
the initializer.)

But yes, it would be nice to explicitly define how this behaves.


https://reviews.llvm.org/D36712



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to