On Jun 14, 2014, at 4:20 PM, Maciej Piechotka <[email protected]> wrote:
>
> As a side question - why do you need volatile? In most cases it's not
> needed (unless you write kernel/driver and do memory based I/O).
>
I've run into the issue calling functions with side effects. Here is a snippet
of my code with the workaround:
/* Need to register types with the glib type system for dynamic
* construction with gtkbuilder. Need to figure out a better way
* to ensure the calls to typeof() are not optimized out.
*/
stdout.printf("Registering %s\n", typeof(AboutDialog).name());
stdout.printf("Registering %s\n", typeof(AddSimulationDialog).name());
stdout.printf("Registering %s\n",
typeof(ArchiveSchematicsDialog).name());
stdout.printf("Registering %s\n", typeof(ExportBOMDialog).name());
stdout.printf("Registering %s\n", typeof(ExportNetlistDialog).name());
stdout.printf("Registering %s\n", typeof(NewDesignDialog).name());
stdout.printf("Registering %s\n", typeof(NewProjectDialog).name());
stdout.printf("Registering %s\n", typeof(RenumberRefdesDialog).name());
stdout.printf("Registering %s\n", typeof(ResetRefdesDialog).name());
stdout.printf("Registering %s\n",
typeof(BackannotateRefdesDialog).name());
Cheers,
Ed
_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list