• Ian Lance Taylor's avatar
    cmd/cgo: don't ignore qualifiers, don't cast to void* · fb8c896a
    Ian Lance Taylor authored
    The cgo tool used to simply ignore C type qualifiers. To avoid problems
    when a C function expected a qualifier that was not present, cgo emitted
    a cast to void* around all pointer arguments. Unfortunately, that broke
    code that contains both a function declaration and a macro, when the
    macro required the argument to have the right type. To fix this problem,
    don't ignore qualifiers. They are easy enough to handle for the limited
    set of cases that matter for cgo, in which we don't care about array or
    function types.
    
    Fixes #17537.
    
    Change-Id: Ie2988d21db6ee016a3e99b07f53cfb0f1243a020
    Reviewed-on: https://go-review.googlesource.com/33097
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    fb8c896a
Name
Last commit
Last update
..
errors Loading commit data...
fortran Loading commit data...
gmp Loading commit data...
life Loading commit data...
nocgo Loading commit data...
stdio Loading commit data...
test Loading commit data...
testasan Loading commit data...
testcarchive Loading commit data...
testcshared Loading commit data...
testgodefs Loading commit data...
testplugin Loading commit data...
testsanitizers Loading commit data...
testshared Loading commit data...
testsigfwd Loading commit data...
testso Loading commit data...
testsovar Loading commit data...
testtls Loading commit data...