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 515423 - register & other C reserved words
register & other C reserved words
Status: RESOLVED DUPLICATE of bug 515225
Product: vala
Classification: Core
Component: Code Generator
0.1.x
Other All
: Normal normal
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-09 15:09 UTC by Tomaz Vajngerl
Modified: 2008-02-09 15:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tomaz Vajngerl 2008-02-09 15:09:25 UTC
Please describe the problem:
valac doesn't complain or work-around for methods named "register" (and possibly other C reserved words - non existing in vala), but generated c compilation fails. 

Steps to reproduce:
using GLib;

class Foo : GLib.Object {
	public string register() {
		return "Foo\n";
	}

	static int main (string[] args) {
		var foo = new Foo(); 
		foo.register();
		
		return 0;
	}
}

Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Jürg Billeter 2008-02-09 15:20:51 UTC
This sample code doesn't trigger any issue as register is not used as identifier in the generated C code. However, the bug is still there.
Comment 2 Jürg Billeter 2008-02-09 15:21:12 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 515225 ***