[llvm-bugs] [Bug 50684] New: error: 'message' causes a section type conflict with 'pluginSection'

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 11 11:11:27 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50684

            Bug ID: 50684
           Summary: error: 'message' causes a section type conflict with
                    'pluginSection'
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: raj.khem at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

with latest trunk I am seeing

this test fail to compile

fakeplugin.cpp
=================
#  define QT_PLUGIN_METADATA_SECTION \
    __attribute__ ((section (".qtmetadata"))) __attribute__((used))
#if QT_POINTER_SIZE == 8
QT_PLUGIN_METADATA_SECTION void *const pluginSection =
(void*)(0xc0ffeec0ffeeL);
#else
QT_PLUGIN_METADATA_SECTION void *const pluginSection = (void*)0xc0ffee;
#endif
QT_PLUGIN_METADATA_SECTION const char message[] = "QTMETADATA";

======
clang++ tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp
tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp:38:39: error: 'message'
causes a section type conflict with 'pluginSection'
QT_PLUGIN_METADATA_SECTION const char message[] = "QTMETADATA";
                                      ^
tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp:36:40: note: declared
here
QT_PLUGIN_METADATA_SECTION void *const pluginSection = (void*)0xc0ffee;
                                       ^
1 error generated.


it worked fine with trunk from a week so ago and works ok with clang12 as well.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210611/e0448c8b/attachment.html>


More information about the llvm-bugs mailing list