bugGNUstep - Bugs: bug #51842, derived_src class has no base:...


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

bug #51842: derived_src class has no base: correct, but triggers a warning from clang-6.x

Submitted by:  David Lobron <dlobron>
Submitted on:  Thu 24 Aug 2017 06:05:33 PM UTC  
Category:  Makefiles Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  Fred Kiefer <FredKiefer>
Open/Closed:  Declined

Thu 24 Aug 2017 08:03:10 PM UTC, comment #4:

Thank you for this clarification. I am able to switch the category for you and will do so.

What I disagree on is that this is an actual GNUstep bug. GNUstep make is doing the right thing by not providing this compiler flag. In Objective-C all classes are expected to either inherit from NSObject of NSProxy. In the rare case where this is not true, the developer should flag the class in a way to tell the compiler about this special case.

Please see this article on how to do it:

The second case should work with GNUstep as we don't provide the NS_ROOT_CLASS macro.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Thu 24 Aug 2017 07:51:32 PM UTC, comment #3:

I don't see an option for me to edit the category.  Can I leave it as Base/Foundation?

Please let me know if you need more info or if you disagree that this is a bug.  I agree that the compiler warning is correct: this auto-generated code really does lack a superclass.  But the issue is that, in this case, it's not supposed to have a superclass, so the warning is spurious.

David Lobron <dlobron>
Thu 24 Aug 2017 07:48:26 PM UTC, comment #2:

My apologies: it looks like the code is generated by gnustep-make, not gnustep-base.  The code is generated from framework.make:


The rule for DUMMY_FRAMEWORK_FILE generates the directory and the dummy class file within it.

Let me see if I can reassign this bug to gnustep-make.

David Lobron <dlobron>
Thu 24 Aug 2017 07:33:59 PM UTC, comment #1:

Could you please explain why you think this is a GNUstep base issue?
To me it looks like the compiler is correct to report this problem and even if this was incorrect it would be a clang issue.

You also write that the code is auto generated. Could you please state by which program?

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Thu 24 Aug 2017 06:05:33 PM UTC, original submission:

When I upgraded to clang-6.0.0 on Linux, a build of my code triggered a warning:

 Compiling file derived_src/NSFramework_AkamaiKit.m ...
derived_src/NSFramework_AkamaiKit.m:2:12: warning: class 'NSFramework_AkamaiKit' defined without specifying a base class [-Wobjc-root-class]
@interface NSFramework_AkamaiKit
derived_src/NSFramework_AkamaiKit.m:2:33: note: add a super class to fix this problem
@interface NSFramework_AkamaiKit
                                 : NSObject

I can work around this by adding -Wno-objc-root-class to my build, but it would be better if this auto-generated code could could be wrapped in a macro that would prevent the warning.  It's correct for there to be no super class.

David Lobron <dlobron>


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 FredKiefer (Posted a comment)
  • -email is unavailable- added by dlobron (Submitted the item)

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

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-24 FredKiefer CategoryBase/Foundation => Makefiles
        StatusNeed Info => Invalid
        Assigned toNone => FredKiefer
        Open/ClosedOpen => Declined
    2017-08-24 FredKiefer StatusNone => Need Info

    Back to the top

    Powered by Savane 3.4