Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated code not compiled by ANSI-C compiler #49

Open
GoogleCodeExporter opened this issue Jul 7, 2015 · 0 comments
Open

Generated code not compiled by ANSI-C compiler #49

GoogleCodeExporter opened this issue Jul 7, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 25 Oct 2013 at 1:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant