Skip to content

mac下几个编译问题 #5

Description

@qiukeren

clang def.cc --std=c++11

In file included from def.cc:39:
././util/path.h:58:10: error: use of undeclared identifier '_getcwd'; did you mean 'getcwd'?
                _getcwd(buffer, 1024);
                ^~~~~~~
                getcwd
/usr/include/unistd.h:448:7: note: 'getcwd' declared here
char    *getcwd(char *, size_t);  //函数名不兼容
         ^
In file included from def.cc:43:
In file included from ././parse/analysis.h:9:
In file included from ././parse/./build.h:15:
././parse/../core/builtin.h:41:17: warning: '/*' within block comment [-Wcomment]
    /*D(arrrfd) /*<C5>ж<CF><D2><FD><D3><C3><C0><E0><D0><CD><CA>Ƿ<F1><D2>Ѿ<AD><B8><B3>ֵ<A3><A8><B7><C7>0<A3><A9><B7><B5><BB><D8>Bool*/ \
                ^
././parse/../core/builtin.h:45:17: warning: '/*' within block comment [-Wcomment]
    /*D(elmrfd) /*<C5>ж<CF><D2><FD><D3><C3><C0><E0><D0><CD><CA>Ƿ<F1><D2>Ѿ<AD><B8><B3>ֵ<A3><A8><B7><C7>0<A3><A9><B7><B5><BB><D8>Bool*/ \
                ^
././parse/../core/builtin.h:90:12: warning: '/*' within block comment [-Wcomment]
    B(eq)  /*<CF><E0><B5><C8>* / \
           ^
././parse/../core/builtin.h:91:12: warning: '/*' within block comment [-Wcomment]
    B(ne)  /*<B2><BB><B5><C8>* / \
           ^
././parse/../core/builtin.h:92:12: warning: '/*' within block comment [-Wcomment]
    B(gt)  /*<B4><F3><D3><DA>* / \
           ^
././parse/../core/builtin.h:93:12: warning: '/*' within block comment [-Wcomment]
    B(ge)  /*<B4><F3><D3>ڵ<C8><D3><DA>* / \
           ^
././parse/../core/builtin.h:94:12: warning: '/*' within block comment [-Wcomment]
    B(lt)  /*С<D3><DA>* / \
           ^
././parse/../core/builtin.h:95:12: warning: '/*' within block comment [-Wcomment]
    B(le)  /*С<D3>ڵ<C8><D3><DA>* / \
           ^
In file included from def.cc:43:
In file included from ././parse/analysis.h:9:
In file included from ././parse/./build.h:16:
././parse/../core/type.h:136:5: error: cast from pointer to smaller type 'int' loses information
    TYPE_POND(Pointer)
    ^~~~~~~~~~~~~~~~~~
././parse/../core/type.h:99:19: note: expanded from macro 'TYPE_POND'
        int adr = (int)t; \
                  ^~~~~~
././parse/../core/type.h:165:5: error: cast from pointer to smaller type 'int' loses information
    TYPE_POND(Refer)
    ^~~~~~~~~~~~~~~~
././parse/../core/type.h:99:19: note: expanded from macro 'TYPE_POND'
        int adr = (int)t; \
                  ^~~~~~
././parse/../core/type.h:198:5: error: cast from pointer to smaller type 'int' loses information
    TYPE_POND(Array)
    ^~~~~~~~~~~~~~~~
././parse/../core/type.h:99:19: note: expanded from macro 'TYPE_POND'
        int adr = (int)t; \
                  ^~~~~~
././parse/../core/type.h:225:25: error: cast from pointer to smaller type 'int' loses information
            return !!( ((int)this)==((int)t) );
                        ^~~~~~~~~
././parse/../core/type.h:225:38: error: cast from pointer to smaller type 'int' loses information
            return !!( ((int)this)==((int)t) );
                                     ^~~~~~
././parse/../core/type.h:316:21: error: cast from pointer to smaller type 'int' loses information
        return !!( ((int)this)==((int)t) );
                    ^~~~~~~~~
././parse/../core/type.h:316:34: error: cast from pointer to smaller type 'int' loses information
        return !!( ((int)this)==((int)t) );
                                 ^~~~~~
def.cc:231:20: error: non-const lvalue reference to type 'argv::Values' cannot bind to a temporary of type 'argv::Values'
    argv::Values & options = getArgs(argc, argv);
                   ^         ~~~~~~~~~~~~~~~~~~~
8 warnings and 9 errors generated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions