[arch-general] gcc broken - Arch specific, applying optimization incorrectly - may explain unexplained problems

David C. Rankin drankinatty at suddenlinkmail.com
Wed Mar 14 01:44:16 UTC 2018


On 03/13/2018 03:28 PM, mar77i via arch-general wrote:
> On 03/13/2018 02:17 AM, PkmX via arch-general wrote:
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84607
> 
> Pass -std=... to compiling the programi n question. If it's in clear deviation of what the respective standard dictates, it's a bug.
> 
> 
> ​Sent with ProtonMail Secure Email.​
> 

Yes, confirmed it was indeed a bug:

  $ gcc -Wall -Wextra -pedantic -std=c11 -o bin/infunc2 infunc2.c
  $ ./bin/infunc2
  In main

And, with Jelle van der Waa's suggestion, I loaded clang (which I never
otherwise install) and it confirms the issue further:

  $ clang -Wall -Wextra -pedantic -std=c11 -o infunc2 infunc2.c
  $ ./infunc2
  In func
  In main

The only part I'm unclear on is where in the fix process
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84607 is on getting fixed and
when that will trickle down to us.

-- 
David C. Rankin, J.D.,P.E.


More information about the arch-general mailing list