From: https://wiki.gnome.org/Projects/Vala/Tutorial
class Demo.HelloWorld : GLib.Object {
public static int main(string[] args) {
stdout.printf("Hello, World\n");
return 0;
}
}
I got:
valac hello.vala
In file included from /usr/include/glib-2.0/glib/gthread.h:34,
from /usr/include/glib-2.0/glib/gasyncqueue.h:34,
from /usr/include/glib-2.0/glib.h:34,
from /usr/include/glib-2.0/gobject/gbinding.h:30,
from /usr/include/glib-2.0/glib-object.h:24,
from /home/dnormandin/Programming/vala/hello.vala.c:6:
/home/dnormandin/Programming/vala/hello.vala.c: In function ‘demo_hello_world_get_type’:
/usr/include/glib-2.0/glib/gatomic.h:131:5: warning: argument 2 of ‘__atomic_load’ discards ‘volatile’ qualifier [-Wincompatible-pointer-types]
131 | __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST);
| ^~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:262:7: note: in expansion of macro ‘g_atomic_pointer_get’
262 | (!g_atomic_pointer_get (location) &&
| ^~~~~~~~~~~~~~~~~~~~
/home/dnormandin/Programming/vala/hello.vala.c:116:13: note: in expansion of macro ‘g_once_init_enter’
116 | if (g_once_init_enter (&demo_hello_world_type_id__once)) {
| ^~~~~~~~~~~~~~~~~
It compiled okay, but what are all those warnings about? I hate seeing stuff like that right off the bat. TIA …