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 622338 - strange errors when using volatile fields
strange errors when using volatile fields
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on: 648330
Blocks:
 
 
Reported: 2010-06-22 00:34 UTC by Maciej (Matthew) Piechotka
Modified: 2018-05-22 13:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Add-volatile-to-GType-profile.patch (2.72 KB, patch)
2011-04-16 19:51 UTC, Maciej (Matthew) Piechotka
none Details | Review
0002-Add-volatile-to-GType-profile.patch (2.74 KB, patch)
2011-04-20 17:26 UTC, Maciej (Matthew) Piechotka
none Details | Review

Description Maciej (Matthew) Piechotka 2010-06-22 00:34:37 UTC
With vala fresh from git:

public class test {
private volatile int i;
static int main(string[] args) {
	test t = new test();
	t.i = 0;
	int j = t.i + 1;
	return j;
}
}


test.vala:2.22-2.22: error: syntax error, expected `;'
private volatile int i;
                     ^
Compilation failed: 1 error(s), 0 warning(s)
Comment 1 Maciej (Matthew) Piechotka 2011-04-16 19:51:31 UTC
Created attachment 186107 [details] [review]
0001-Add-volatile-to-GType-profile.patch
Comment 2 Maciej (Matthew) Piechotka 2011-04-20 17:26:58 UTC
Created attachment 186381 [details] [review]
0002-Add-volatile-to-GType-profile.patch

Patch rebased against attachment 186380 [details] [review]
Comment 3 Maciej (Matthew) Piechotka 2011-08-12 10:19:06 UTC
After talk with Jürg on Desktop Summit: he found much cleaner implementation of atomics. I'm lefting this bug opened as the error is still present.
Comment 4 Luca Bruno 2011-08-12 10:27:41 UTC
(In reply to comment #3)
> After talk with Jürg on Desktop Summit: he found much cleaner implementation of
> atomics. I'm lefting this bug opened as the error is still present.

Volatile is not only about atomic.
Comment 5 Maciej (Matthew) Piechotka 2011-08-12 10:33:12 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > After talk with Jürg on Desktop Summit: he found much cleaner implementation of
> > atomics. I'm lefting this bug opened as the error is still present.
> 
> Volatile is not only about atomic.

No, it is not but the main argument for introducing the volatile in Vala was to have proper atomic support (using glib functions/macros). Other uses while useful are rather not in area Vala is targeting (like drivers etc.). If you can think about useful case of volatile in Vala (by useful I mean justifing extending language itself rather then using other language or other language + C) please fell free to mention it here. During our discussion only a kernel in Vala from a few years back appeared.
Comment 6 GNOME Infrastructure Team 2018-05-22 13:39:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/110.