google / flatbuffers

FlatBuffers: Memory Efficient Serialization Library

Home Page:https://flatbuffers.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[C++] Improper escaping of table named "export"

jameskuszmaul-brt opened this issue · comments

If you create a table named export the generated code is inconsistent and ends up with the errors in https://github.com/google/flatbuffers/runs/5382749465?check_suite_focus=true

In file included from /home/runner/work/flatbuffers/flatbuffers/tests/test.cpp:24:
/home/runner/work/flatbuffers/flatbuffers/tests/monster_test_generated.h:1231:12: error: use of undeclared identifier 'export_TypeTable'; did you mean 'exportTypeTable'?
    return export_TypeTable();
           ^~~~~~~~~~~~~~~~
           exportTypeTable
/home/runner/work/flatbuffers/flatbuffers/tests/monster_test_generated.h:117:38: note: 'exportTypeTable' declared here
inline const flatbuffers::TypeTable *exportTypeTable();
                                     ^
[ [98](https://github.com/google/flatbuffers/runs/5382749465?check_suite_focus=true#step:4:98)%] Building CXX object CMakeFiles/flattests.dir/src/code_generators.cpp.o
In file included from /home/runner/work/flatbuffers/flatbuffers/tests/test_builder.cpp:1:
In file included from /home/runner/work/flatbuffers/flatbuffers/tests/test_builder.h:8:
/home/runner/work/flatbuffers/flatbuffers/tests/monster_test_generated.h:1231:12: error: use of undeclared identifier 'export_TypeTable'; did you mean 'exportTypeTable'?
    return export_TypeTable();
           ^~~~~~~~~~~~~~~~
           exportTypeTable
/home/runner/work/flatbuffers/flatbuffers/tests/monster_test_generated.h:117:38: note: 'exportTypeTable' declared here
inline const flatbuffers::TypeTable *exportTypeTable();
                                     ^
1 error generated.

This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.

This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.