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

[Bug default/21772] New: ignore whitespace changes when comparing names:



https://sourceware.org/bugzilla/show_bug.cgi?id=21772

            Bug ID: 21772
           Summary: ignore whitespace changes when comparing names:
           Product: libabigail
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: woodard at redhat dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

Created attachment 10258
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10258&action=edit
test source

Given:
[ben@localhost c++test]$ cat test1.cpp
template <typename T, typename U = T*> struct A;

A<int> *p;
[ben@localhost c++test]$ c++ -c -g test1.cpp 
[ben@localhost c++test]$ clang++ -c -g test1.cpp -o test1-clang.o 
[ben@localhost c++test]$ ../libabigail/build/tools/abidiff test1.o
test1-clang.o 
Functions changes summary: 0 Removed, 0 Changed, 0 Added function
Variables changes summary: 0 Removed, 1 Changed, 0 Added variable

1 Changed variable:

  [C]'A<int, int*>* p' was changed to 'A<int, int *>* p' at test1.cpp:3:1:
    type of variable changed:
     in pointed to type 'struct A<int, int*>':
       type name changed from 'A<int, int*>' to 'A<int, int *>'
       type size hasn't changed

These should evaluate the same because the only difference is in the
whitespace.

Furthermore this is not an actual ABI artifact as can be seen by:

[ben@localhost c++test]$ cat test2.cpp 
template <typename T, typename U = T*> struct A {
  T a;
  U b;
};

A<int> i;

[ben@localhost c++test]$ c++ -c -g test2.cpp 
[ben@localhost c++test]$ clang++ -c -g test2.cpp -o test2-clang.o 
[ben@localhost c++test]$ ../libabigail/build/tools/abidiff test2.o
test2-clang.o 
Functions changes summary: 0 Removed, 0 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed (1 filtered out), 0 Added
variable

-- 
You are receiving this mail because:
You are on the CC list for the bug.