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 Richard Smith via cfe-commits
; construct and that NetBSD's stack smashing protection uses it. We shouldn't > break that. I've added a testcase to make sure it continues working. Please > review! > > Nick > > Looks good to me. Thanks! >>> >>> - Gao >>> >>> >>>

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

2015-12-11 Thread Nick Lewycky via cfe-commits
;t issue an error on the case Yunzhong actually supplied. Joerg has pointed out over IRC that this is a really useful construct and that NetBSD's stack smashing protection uses it. We shouldn't break that. I've added a testcase to make sure it continues working. Please review! Nick Lo

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

2015-12-11 Thread Richard Smith via cfe-commits
ose asm name is "real_g", and we have a function whose source-level name is "real_g()" and whose asm name is "gold". What's wrong with that? > Looks good to me. Thanks! > > - Gao > > > > > > *From:* Nick Lewycky [mailto:nlewy...@goo

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
...@google.com] Sent: Friday, December 11, 2015 12:44 AM To: Gao, Yunzhong Cc: Clang Commits Subject: Re: PATCH: error on code that redeclares with an __asm__ label after the first ODR use On 10 December 2015 at 17:42, Gao, Yunzhong mailto:yunzhong_...@playstation.sony.com>> wrote: Out of curiosi

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

2015-12-11 Thread Nick Lewycky via cfe-commits
On 10 December 2015 at 17:42, Gao, Yunzhong < yunzhong_...@playstation.sony.com> wrote: > Out of curiosity, is the following test case possible too? > > > > void f(); > > void g() __asm__(“real_g”); // rename g into real_g. > > > > void f() { > > g(); // this would actually be calling real_g() >