public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/28505] New: Add an option to treat char* and void* as equivilent
@ 2021-10-27 16:56 woodard at redhat dot com
  0 siblings, 0 replies; only message in thread
From: woodard at redhat dot com @ 2021-10-27 16:56 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 28505
           Summary: Add an option to treat char* and void* as equivilent
           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: ---

In C in particular “void” is weird and while you can have a void* you really
can’t have a void type and so I kind of feel like messages like:

$ abidiff a.o2 b.o2 
Functions changes summary: 0 Removed, 1 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

1 function with some indirect sub-type change:

 [C] 'function char* chop(char*)' at b.c:2:1 has some indirect sub-type
changes:
   return type changed:
     in pointed to type 'char':
       type name changed from 'char' to 'void'
       type size changed from 8 to 0 (in bits)
   parameter 1 of type 'char*' changed:
     in pointed to type 'char':
       type name changed from 'char' to 'void'
       type size changed from 8 to 0 (in bits)

are spurious. There should be some some special logic that stops at the pointer
level with voids and doesn’t try to drill down. i.e. 

 [C] 'function char* chop(char*)' at b.c:2:1 has some type changes:
   return type changed from 'char*' to ‘void*'
   parameter 1 of type 'char*’ changed to ‘void*'

Making it optionally harmless may also be a good thing since the standard idiom
in C changed from using char* for buffers to using void* and many APIs have
changed as a result. This leads to problems comparing the ABIs of libraryies.

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-27 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 16:56 [Bug default/28505] New: Add an option to treat char* and void* as equivilent woodard at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).