Re: Failure to compile code with icc, but gcc and clang work

200 views
Skip to first unread message

Matt Godbolt

unread,
Mar 9, 2018, 4:26:16 PM3/9/18
to Jens Auer, compiler-explo...@googlegroups.com
Hi Jens (CC'ing the discussion list)

I'm afraid I'm no icc expert... This looks like a GCC extension in the STL headers that icc 17 doesn't support.

icc 18 compiles it just fine: https://godbolt.org/g/i9tLeZ (though note I had to untick the "binary" filter you had selected as compiling this to a binary requires libraries that can't be found, specifically `-lm`

Hope that helps,

--matt

On Fri, Mar 9, 2018 at 3:12 PM Jens Auer <jens...@betaversion.net> wrote:

Hi Matt,

 

I am playing around with some code on your great compiler explorer side and wanted to see the code generated by icc. However, if I select icc in the compiler list I get lots of errors like

 

/opt/compiler-explorer/gcc-7.2.0/bin/../include/c++/7.2.0/bits/move.h(48): error: identifier "__builtin_addressof" is undefined

      { return __builtin_addressof(__r); }

 

You can find the example at https://godbolt.org/g/v1p2Gs. Gcc and clang both work, but icc of any version fails.

 

Best wishes and thanks for this great service,

Jens

Reply all
Reply to author
Forward
0 new messages