gcc 7 vs. -fvisibility=hidden vs. lambdas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Compiling a large C++ program that has -fvisibility=hidden, I get tons of


./partition_version.hh: In instantiation of 'struct partition_snapshot_reader<MemoryAccounter>::fill_buffer()::<lambda()> [with MemoryAccounter = partition_snapshot_reader_dummy_accounter]::<lambda()>': ./partition_version.hh:506:49: required from 'partition_snapshot_reader<MemoryAccounter>::fill_buffer()::<lambda()> [with MemoryAccounter = partition_snapshot_reader_dummy_accounter]' ./partition_version.hh:507:32: required from 'struct partition_snapshot_reader<MemoryAccounter>::fill_buffer() [with MemoryAccounter = partition_snapshot_reader_dummy_accounter]::<lambda()>' ./partition_version.hh:505:29: required from 'future<> partition_snapshot_reader<MemoryAccounter>::fill_buffer() [with MemoryAccounter = partition_snapshot_reader_dummy_accounter]'
build/release/gen/cql3/CqlParser.cpp:61242:1:   required from here
./partition_version.hh:506:52: error: 'partition_snapshot_reader<MemoryAccounter>::fill_buffer()::<lambda()> [with MemoryAccounter = partition_snapshot_reader_dummy_accounter]::<lambda()>' declared with greater visibility than the type of its field 'partition_snapshot_reader<MemoryAccounter>::fill_buffer()::<lambda()> [with MemoryAccounter = partition_snapshot_reader_dummy_accounter]::<lambda()>::<this capture>' [-Werror=attributes]
             return with_linearized_managed_bytes([&] {
                                                    ^

Adding -Wno-error-attributes or -Wno-error=attributes does not help.


I have no idea what 7 wants. The entire program is compiled with -fvisibility=hidden, apart from some malloc() family definitions in a different translation unit. Everything has the same visibility.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux