31 Mar 03:25
[PATCH] Don't output #line 0 directives for prototypes.
Nick Bowler <nbowler <at> draconx.ca>
2011-03-31 01:25:28 GMT
2011-03-31 01:25:28 GMT
It is not valid for the integer argument of a #line directive to be 0.
However, the generated C source will contain such a directive around the
prototypes of private functions that do not appear in the .gob file.
For example, the trivial
class My:Test from G:Object {
}
generates the invalid C code:
#line 0 "my-test.gob"
static void my_test_init (MyTest * o) G_GNUC_UNUSED;
/* ... */
#line 0 "my-test.gob"
static void my_test_class_init (MyTestClass * c) G_GNUC_UNUSED;
Fix this up and add an assertion to out_addline_infile to catch future
problems of this nature.
---
Hopefully this is the right place to send patches! The gob2 website
doesn't make any mention of where they should be sent.
src/main.c | 6 ++++--
src/out.c | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
index 5d2d4c9..cd8edef 100644
--- a/src/main.c
(Continue reading)
RSS Feed