libs-gui icon indicating copy to clipboard operation
libs-gui copied to clipboard

block macro fails to compile

Open rmottola opened this issue 3 years ago • 3 comments

using clang 10:

Compiling file NSFontAssetRequest.m ... NSFontAssetRequest.m:48:3: error: incompatible operand types ('int' and 'id') CALL_BLOCK(completionHandler, error); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /System/Library/Headers/GNUstepBase/GSBlocks.h:110:53: note: expanded from macro 'CALL_BLOCK' ...args...) ((NULL != block) ? CALL_NON_NULL_BLOCK(block, args) : nil) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ 1 error generated.

rmottola avatar Jan 12 '22 10:01 rmottola

Hey,

Which version of gcc is this? Is it one we support? If not, should we?

GC

On Wed, Jan 12, 2022 at 5:52 AM Riccardo @.***> wrote:

using older gcc:

Compiling file NSFontAssetRequest.m ... NSFontAssetRequest.m:48:3: error: incompatible operand types ('int' and 'id') CALL_BLOCK(completionHandler, error); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /System/Library/Headers/GNUstepBase/GSBlocks.h:110:53: note: expanded from macro 'CALL_BLOCK' ...args...) ((NULL != block) ? CALL_NON_NULL_BLOCK(block, args) : nil) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ 1 error generated.

— Reply to this email directly, view it on GitHub https://github.com/gnustep/libs-gui/issues/132, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAG2J6M4ZVDMN3LPMJ7R2TUVVMNVANCNFSM5LYUVUXA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Gregory Casamento GNUstep Lead Developer / OLC, Principal Consultant http://www.gnustep.org - http://heronsperch.blogspot.com https://www.patreon.com/bePatron?u=352392 - Become a Patron https://gf.me/u/x8m3sx - My GNUstep GoFundMe https://teespring.com/stores/gnustep - Store

gcasa avatar Jan 12 '22 21:01 gcasa

it's clang 10?

rmottola avatar Jan 13 '22 00:01 rmottola

This works with later versions of clang. There was a bug which I reported in this very same class for clang-10 and 11. https://bugs.llvm.org/show_bug.cgi?id=52431

Please try 9 or 13. :) Let me know.

gcasa avatar Jan 25 '22 12:01 gcasa

No response. Therefore closing.

gcasa avatar Jan 01 '23 07:01 gcasa

Bumping this issue as this persists on Clang 14.

OmerFlame avatar Jun 24 '23 12:06 OmerFlame