Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rock code:
handlerInstall: static func (irq: Int, handler: Func (Registers*)) {
irqRoutines[irq] = handler as Closure thunk
}
clang error:
src/devices/cpu/IRQ.ooc:58:5: error: used type 'lang_types__Closure' (aka
'struct _lang_types__Closure') where arithmetic or pointer type is
required
..._lang_array__Array_set(devices_cpu_IRQ__IRQ_class()->irqRoutines, irq, lang_types__Pointer, ((lang_types__Closure) (handler)).thunk)...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/devices/cpu/IRQ.ooc:58:98: note: instantiated from:
...irq, lang_types__Pointer, ((lang_types__Closure) (handler)).thunk);
^ ~~~~~~~~~
1 diagnostic generated.
C compiler failed, aborting compilation process
[FAIL]
make: *** [src/oos.lib] Error 1
gcc error:
gcc -std=gnu99 -Wall -g -I/home/patricio/rock/libs/headers/ -Irock_tmp -m32 -nostdinc -ffreestanding -fno-stack-protector -c rock_tmp/src/devices/cpu/IRQ.c -o rock_tmp/devices_cpu_IRQ.o -I/home/patricio/rock/libs/headers/ -Irock_tmp -Iinclude -I.libs/src -I.libs/sdk -m32 -nostdinc -ffreestanding -fno-stack-protector
src/devices/cpu/IRQ.ooc: In function ‘devices_cpu_IRQ__IRQ_handlerInstall’:
src/devices/cpu/IRQ.ooc:58: error: conversion to non-scalar type requested
C compiler failed, aborting compilation process
[FAIL]
make: *** [src/oos.lib] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.