yossi-k / protobuf-embedded-c

Automatically exported from code.google.com/p/protobuf-embedded-c
0 stars 0 forks source link

Generated code not compiled by ANSI-C compiler #49

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generation of message.c file corresponding to some message.proto file.

What is the expected output? What do you see instead?
Generated file should be compiled by ANSI-C standard compiler but gave 
compilation errors.

What version of the product are you using? On what operating system?
1.0M4

Please provide any additional information below.
In our project(Embedded) we tried to integrate the Protobuf embedded C 
generated files.  All files in our project are applied with ANSI-C compiler 
option but the generated file is not compiled by ANSI-C but only with C-99 
standard compiler.  We had to apply C-99 compiler flag setting only for this 
file.  The following piece of code gave compilation issue.

int read_raw_little_endian32(unsigned long *tag, void *_buffer, int offset) {
    offset = read_raw_byte((char *)tag, _buffer, offset);
    char b1 = (char) *tag;

ERROR: b1 is not declared something like that.

It would be nice if this issue can be looked into to resolve.

Original issue reported on code.google.com by pradeepkumar.pola14@gmail.com on 25 Oct 2013 at 1:17