Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
Bug 299 - Unnecessary runtime dependencies for minimal runtime build
Summary: Unnecessary runtime dependencies for minimal runtime build
Status: NEW
Alias: None
Product: GDC
Classification: Unclassified
Component: gdc (show other bugs)
Version: development
Hardware: All All
: --- normal
Assignee: Iain Buclaw
URL:
Depends on:
Blocks:
 
Reported: 2018-07-20 08:45 CEST by Mike
Modified: 2018-07-20 08:45 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2018-07-20 08:45:22 CEST
object.d
---
module object;

alias size_t = typeof(int.sizeof);
alias string = immutable(char)[];

bool _xopEquals(in void*, in void*)
{
    return false;
}
---

test.d
---
struct X(A...)
{
    A args;
}

auto x(A...)(A args) if(A.length > 0 && is(A[0] == string))
{
    return X!A(args);
}

enum inline = x("abc");

void main()
{ }
---

GDC built from master on 2018-07-20.

arm-none-eabi-gdc -c -nophoboslib -nostdinc -nodefaultlibs -nostdlib test.d
cc1d: error: undefined identifier 'Object' in module 'object', did you mean import 'object'?
cc1d: error: 'object.TypeInfo' could not be found, but is implicitly used
(null):0: confused by earlier errors, bailing out

There are 2 issues:
1) I don't think the `_xopEquals` should be required to get a build
2) I don't think this code should require `class Object` or `class TypeInfo` from object.d

LDC and DMD can both build the above code without issue.