[LLVMbugs] [Bug 22332] New: local labels in gtest-death-test-internal.h are not compiled by gcc-5.0

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 26 08:18:52 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22332

            Bug ID: 22332
           Summary: local labels in gtest-death-test-internal.h are not
                    compiled by gcc-5.0
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: alserkli at inbox.ru
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13734
  --> http://llvm.org/bugs/attachment.cgi?id=13734&action=edit
[PATCH] use local labels instead of __LINE__

Compilation with gcc (GCC) 5.0.0 20150126 of trunk gives an error in expansion
of EXPECT_DEATH(VariantValue(VariantMatcher::SingleMatcher(varDecl())) at
llvm/tools/clang/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp:149 due to
the use of __LINE__ in
utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h to
create local labels: in new gcc __LINE__ is replaced with different values and
thus the labels do not match [1].

Attached patch solves the problem by using a local label instead of __LINE__.

[1] <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64803>

-- 
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/20150126/31acd843/attachment.html>


More information about the llvm-bugs mailing list