After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779609 - Implicit declaration of function when using [HasEmitter] signal
Implicit declaration of function when using [HasEmitter] signal
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator: GSignal
0.35.x
Other Linux
: Normal minor
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-05 12:58 UTC by gandalfn
Modified: 2017-03-07 17:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
signalmodule: Add signal-emitter declaration if needed (1.34 KB, patch)
2017-03-07 15:34 UTC, Rico Tzschichholz
committed Details | Review

Description gandalfn 2017-03-05 12:58:13 UTC
When using signal with [HasEmitter] attribute from external module, c compiler report: implicit declaration of function ... [-Wimplicit-function-declaration]

for example if we have a module (test.vala) with class declaration:

public class Test : Object {
	[HasEmitter]
	public signal void test ();
}

and we use it in another module (test-main.vala):

static int main (string[] args) {
	Test test = new Test();
	test.test();
	return 0;
}

> valac test.vala test-main.vala report:
test-main.vala.c: In function ‘_vala_main’:
test-main.vala.c:36:2: warning: implicit declaration of function ‘test_test’ [-Wimplicit-function-declaration]
Comment 1 Rico Tzschichholz 2017-03-07 15:34:32 UTC
Created attachment 347404 [details] [review]
signalmodule: Add signal-emitter declaration if needed
Comment 2 Rico Tzschichholz 2017-03-07 17:29:29 UTC
Attachment 347404 [details] pushed as 05f5f5f - signalmodule: Add signal-emitter declaration if needed