RE: PATCH: error on code that redeclares with an __asm__ label after the first ODR use

2015-12-11 Thread Gao, Yunzhong via cfe-commits
[mailto:meta...@gmail.com] On Behalf Of Richard Smith Sent: Friday, December 11, 2015 12:57 PM To: Gao, Yunzhong Cc: Nick Lewycky; Clang Commits Subject: Re: PATCH: error on code that redeclares with an __asm__ label after the first ODR use On Fri, Dec 11, 2015 at 12:43 PM, Gao, Yunzhong via cfe-commits

RE: PATCH: error on code that redeclares with an __asm__ label after the first ODR use

2015-12-11 Thread Gao, Yunzhong via cfe-commits
gcc 4.8.2 accepts the following case silently without error or warning: void f(); void g() __asm__(“real_g”); void f() { g(); } // gcc emits a call to real_g() here void real_g() __asm__(“gold”); void real_g() { } // gcc generates a body for gold() here gcc 4.8.2 generates a warning for t