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

 
 

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

Submitted by:  bungeman <bungeman>
Submitted on:  Fri 18 Aug 2017 08:41:48 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.8.1

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 23 Aug 2017 06:20:05 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.8.1
    Fri 18 Aug 2017 08:48:53 PM UTCwlCarbon-Copy-=>Added behdad

    Back to the top


    Powered by Savane 3.1-cleanup1