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 433288 - pointer and integer conversion
pointer and integer conversion
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.0.x
Other All
: Normal normal
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-25 12:32 UTC by Michael Lawrence
Modified: 2008-10-18 00:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Lawrence 2007-04-25 12:32:28 UTC
Please describe the problem:
Right now G_POINTER_TO_INT is only invoked on return values of method invocations. It should really work wherever a pointer is assigned to an integer. I specifically ran into this when using foreach with an SList<uint>.

Steps to reproduce:
SList<uint> indices = new SList<uint>();
foreach(uint i in indices) { }

Actual results:
C compiler gives the warning:
warning: initialization makes integer from pointer without a cast

Expected results:
no warnings, with correct cast

Does this happen every time?
yes

Other information:
Comment 1 Jürg Billeter 2007-04-30 07:38:38 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 2 Marc-Andre Lureau 2008-10-18 00:11:49 UTC
Added to vala-tests