Skip to content

Instantly share code, notes, and snippets.

@nddrylliog
Forked from fredreichbier/gcc output
Created April 25, 2010 14:24
Show Gist options
  • Save nddrylliog/378437 to your computer and use it in GitHub Desktop.
Save nddrylliog/378437 to your computer and use it in GitHub Desktop.

Revisions

  1. nddrylliog revised this gist Apr 25, 2010. 2 changed files with 5 additions and 8 deletions.
    6 changes: 0 additions & 6 deletions gcc output
    Original file line number Diff line number Diff line change
    @@ -1,6 +0,0 @@
    rock_tmp/./extern.c: In function 'bar':
    rock_tmp/./extern.c:20: error: 'extern__CClass' has no member named 'foo'
    rock_tmp/./extern.c: At top level:
    rock_tmp/./extern.c:69: error: redefinition of 'bar'
    rock_tmp/./extern.c:19: note: previous definition of 'bar' was here
    C compiler failed, aborting compilation process
    7 changes: 5 additions & 2 deletions gistfile1.ooc
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    bar: unmangled func (t: C) {

    "Hey, it's a %s" format(t class name) println()
    }

    C: class {
    foo: extern(bar) func
    }
    }

    C new() foo()
  2. @fredreichbier fredreichbier created this gist Apr 25, 2010.
    6 changes: 6 additions & 0 deletions gcc output
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    rock_tmp/./extern.c: In function 'bar':
    rock_tmp/./extern.c:20: error: 'extern__CClass' has no member named 'foo'
    rock_tmp/./extern.c: At top level:
    rock_tmp/./extern.c:69: error: redefinition of 'bar'
    rock_tmp/./extern.c:19: note: previous definition of 'bar' was here
    C compiler failed, aborting compilation process
    6 changes: 6 additions & 0 deletions gistfile1.ooc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    bar: unmangled func (t: C) {

    }
    C: class {
    foo: extern(bar) func
    }