bugThe FreeType Project - Bugs: bug #51788, pngshim.c doesn't compile with...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #51788: pngshim.c doesn't compile with clang.

Submitter:  bungeman <bungeman>
Submitted:  Fri 18 Aug 2017 08:41:48 PM UTC
   
 
Severity:  3 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.8.1

Wed 23 Aug 2017 06:20:05 AM UTC, comment #4: 

Well, I figured it out, cf.

  http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?r1=105478&r2=105589

Should be fixed now in git, please test.

Werner LEMBERG <wl>
Group administrator
Wed 23 Aug 2017 12:59:31 AM UTC, comment #3: 

Maybe we can disable this for clang for now until we figure out which version supports what we use. -behdad

Anonymous
Fri 18 Aug 2017 09:21:04 PM UTC, comment #2: 

Note that if I use a very new version of clang, the only errors I get are about '__builtin_shuffle'. It appears that 3.9 didn't yet support mixed scalar/vector operators (at least with the gcc style vectors, see http://lists.llvm.org/pipermail/cfe-dev/2016-May/048958.html ) but it appears tip of tree clang does support the mixed operators. I'm not sure when this was added.

bungeman <bungeman>
Fri 18 Aug 2017 08:48:53 PM UTC, comment #1: 

Behdad, please have a look!

Werner LEMBERG <wl>
Group administrator
Fri 18 Aug 2017 08:41:48 PM UTC, original submission:  

From a clean checkout...
$ git checkout 7653c76533dcde3d87bd7af5a2c12e8c95412c12
$ ./autogen.sh
$ CC=clang-3.9 CXX=clang++-3.9 ./configure
$ CC=clang-3.9 CXX=clang++-3.9 make

src/sfnt/pngshim.c:88:14: error: cannot convert between vector values of different size
      ('v82' (vector of 8 'unsigned short' values) and 'int')
      s0 = s & 0xFF;                        /*  R B  R B  R B  R B */
           ~ ^ ~~~~
/usr/local/google/home/bungeman/src/freetype2/src/sfnt/pngshim.c:89:14: error: cannot convert between vector values of different size
      ('v82' (vector of 8 'unsigned short' values) and 'int')
      s1 = s >> 8;                          /*  G A  G A  G A  G A */
           ~ ^  ~
/usr/local/google/home/bungeman/src/freetype2/src/sfnt/pngshim.c:91:12: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]
      a  = __builtin_shuffle( s1, ma );     /*  A A  A A  A A  A A */

it appears that this started with '[sfnt] Speed up PNG image loading.'. It appears clang doesn't support '__builtin_shuffle' (even at tip of tree). I think clang's version of this is '__builtin_shufflevector'.


bungeman <bungeman>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by wl
  • -email is unavailable- added by bungeman (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-23 wl StatusNone Fixed
        Assigned toNone wl
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.8.1
    2017-08-18 wl Carbon-Copy- Added behdad

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code