Valac generates invalid C source (const gchar * + const char *)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vala-0.14 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Using the source given as an attached file (not the real application, I stripped as much as possible from it), compilation using the options given below, terminates with this error:
Compilation failed: 1 error(s), 0 warning(s)
<cwd>
<cwd>
Using `valac` invoked as in (recalled in the attached source file):
valac \
--pkg gtk+-3.0 \
"bug.vala";
-----
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: valac 0.14.2-0ubuntu1
ProcVersionSign
Uname: Linux 3.2.0-37-
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: i386
CheckboxSubmission: 9b39dc487a858b4
CheckboxSystem: d00f84de8a55581
Date: Tue Feb 19 07:48:34 2013
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
MarkForUpload: True
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=fr_FR.UTF-8
SHELL=/bin/bash
SourcePackage: vala-0.14
UpgradeStatus: No upgrade log present (probably fresh install)
I've noticed the error disappears if this `valac` option is removed:
--enable- experimental- non-null
(I'm unlucky, as I love the idea of this kind of check).
As a workaround for now, running `valadoc` with the same option, does not make it fails, checks the source and points any error about conversion attempt like from `string?` to `string`. Finally I can disable the option for compiling and keep it for document generation, which becomes a kind of added check.
Would still be better if using this option would not result in invalid C source generation.
How is it supposed to impact C source generation? Though it was only about static checking...