WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Generated code not compiled by ANSI-C compiler #49

@GoogleCodeExporter

Description

@GoogleCodeExporter
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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions