8000 Build error with clang: mgd.c: error: call to undeclared function 'failwith', etc. · Issue #71 · kfl/mosml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Build error with clang: mgd.c: error: call to undeclared function 'failwith', etc. #71
Open
@barracuda156

Description

@barracuda156
  make[1]: Entering directory `/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_lang_mosml/mosml-dynlibs/work/mosml-13c581aec46eea134e478f2e2b6456278e36ecce/src/dynlibs/mgd'
  /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_lang_mosml/mosml-dynlibs/work/compwrap/cc/usr/bin/clang -Dunix -O2 -fno-defer-pop -fPIC -I/opt/local/include/mosml -I/opt/local/include -c -o mgd.o mgd.c
  clang: warning: optimization flag '-fno-defer-pop' is not supported [-Wignored-optimization-argument]
  mgd.c:82:5: error: call to undeclared function 'failwith'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      failwith("Could not create image");
      ^
  mgd.c:96:5: error: call to undeclared function 'failwith'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      failwith("Cannot open PNG file for input");
      ^
  mgd.c:112:5: error: call to undeclared function 'failwith'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      failwith("Cannot open PNG file for output");
      ^
  mgd.c:127:3: error: call to undeclared function 'flush'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    flush(stdout);
    ^
  mgd.c:127:3: note: did you mean 'fflush'?
  /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/stdio.h:146:6: note: 'fflush' declared here
  int      fflush(FILE *);
           ^
  mgd.c:167:3: error: call to undeclared function 'modify'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    modify(&Field(res, 0), Val_long(color));
    ^
  mgd.c:184:10: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  { return Val_long(gdTransparent); }
           ^~~~~~~~~~~~~~~~~~~~~~~
  /opt/local/include/mosml/mlvalues.h:63:37: note: expanded from macro 'Val_long'
  #define Val_long(x)     (((long)(x) << 1) + 1)
                            ~~~~~~~~~ ^
  mgd.c:189:10: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  { return Val_long(gdBrushed); }
           ^~~~~~~~~~~~~~~~~~~

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

      0