This is an archive of the discontinued LLVM Phabricator instance.

Fix buildgo.sh script because of recent changes causing build failures with gcc on linux
ClosedPublic

Authored by dyung on Mar 30 2020, 6:11 PM.

Details

Summary

A recent commit ad1466f8cbc520b2f03e1f6daa78f035bccf21df to sanitizer_linux.cpp added code that gcc in C++11 mode cannot handle. Specifically, it added code that included binary literals that gcc in c++11 mode gives an error on. For example, here is the error I get on my local machine:

gotsan.cpp:14071:16: error: missing terminating ' character [-Werror]

case 0b10'010:  // c.lwsp (rd != x0)
         ^

Clang does not give an error on the same code. I found that changing the compiler standard used to c++14 where this is officially supported passes with both gcc and clang, so this should hopefully fix the issue.

Diff Detail

Event Timeline

dyung created this revision.Mar 30 2020, 6:11 PM
dvyukov accepted this revision.Mar 31 2020, 12:42 AM

Thanks!

This revision is now accepted and ready to land.Mar 31 2020, 12:42 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2020, 10:00 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript