/usr/bin/perl /usr/share/perl5/vendor_perl/ExtUtils/xsubpp -typemap / +usr/share/perl5/ExtUtils/typemap -typemap typemap Utils.xs > Utils.x +sc && mv Utils.xsc Utils.c Please specify prototyping behavior for Utils.xs (see perlxs manual) gcc -c -I/DBA/lua/5.2.1/include -Wall -Wno-strict-aliasing -O2 -g -pi +pe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-stron +g --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic + -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC "-I/usr/lib64/perl5/C +ORE" Utils.c Utils.xs: In function ‘perl_to_lua’: Utils.xs:263:13: warning: dereferencing type-punned pointer will break + strict-aliasing rules [-Wstrict-aliasing] char *key = HePV (he, key_len); ^ Utils.xs:263:13: warning: dereferencing type-punned pointer will break + strict-aliasing rules [-Wstrict-aliasing] Utils.xs:263:13: warning: dereferencing type-punned pointer will break + strict-aliasing rules [-Wstrict-aliasing] Utils.xs:263:13: warning: dereferencing type-punned pointer will break + strict-aliasing rules [-Wstrict-aliasing] Running Mkbootstrap for N2::Lua::Utils ()

It's 1000 lines of XS code. I'd have to trim it down a bit.

But in any case I think the answer is environmental, not in the code, as it compiles without warnings under Ubuntu 18.04, but WITH warnings under Oracle Linux Server 7.3.

Here's the full build output. And I see that -Wno-strict-aliasing is actually present in the GCC options! So why on earth are we still getting that warning?


In reply to Re^4: Calling HePV - "warning: dereferencing type-punned pointer will break strict-aliasing rules" by the.jxc
in thread Calling HePV - "warning: dereferencing type-punned pointer will break strict-aliasing rules" by the.jxc

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.