-
andyf
tsoome - a trailing comma on an enum is a C99 thing, isn't it?
-
jbk
i believe so
-
andyf
We probably shouldn't have that in blkdev.h then (although still definitely good to make dtrace handle it)
-
jbk
is blkdev.h something we expect userland to use?
-
jbk
(IIUC, kernel is C99.. it's just stuff userland might #include that still needs to be c89 compat)
-
andyf
good point, no, it doesn't look like it
-
tsoome
there are few places with trailing comma.
-
gitomat
[illumos-gate] 15289 cmd: remove pragma ident -- Toomas Soome <tsoome⊙mc>
-
tsoome
lib cleanup RTI builds started, soon this is history and we can hunt down unknown pragmas;)
-
jperkin
removing the _CHAR_IS_SIGNED sections from sys/int_types.h and making int*8_t fixes a bunch of C++ software for me with no regressions that I can see, is there anything else I might be missing?
-
jperkin
.."making int*8_t signed char explicitly"
-
jperkin
alanc: be interested to know if solaris 11.4 has changed ^^ too
-
alanc
we still have _CHAR_IS_SIGNED
-
jperkin
ok thanks
-
alanc
but we still support Studio cc, which has the -xchar={signed,unsigned} option
-
andyf
and char is not signed on aarch64, IIRC.
-
jperkin
yeh it wouldn't affect that
-
sommerfeld
"typedef signed char int8_t" works regardless of the default signed-ness of char
-
sommerfeld
the " Note that int8_t
-
sommerfeld
* is not defined in -Xs mode on ISAs for which the ABI specifies "char"
-
sommerfeld
* as an unsigned entity because there is no way to define an eight bit
-
sommerfeld
* signed integral.
-
sommerfeld
" comment appears to be out of sync with the code beneath
-
sommerfeld
(were there a bunch of #ifdef __STDC__ or the like in there that got stripped when it was safe to use the "signed" keyword unconditionally?)
-
alanc
in the Solaris version, there's still an #if defined(__STDC__) around the typedef signed char int8_t; in the #else clause of #if defined(_CHAR_IS_SIGNED)
-
richlowe
you can't remove the _CHAR_IS_SIGNED bits, we need them.
-
richlowe
making them signed explicitly sounds good
-
richlowe
but in general _CHAR_IS_SIGNED/UNSIGNED is important
-
alanc
looks like gdamore dropped that __STDC__ check in
illumos/illumos-gate ba3594b but failed to update your comments to match
-
jperkin
sure, I'm not proposing removing them generally, just the sections in sys/int_types.h
-
jperkin
anyway I'll keep this in my tree for now and see if anything falls out with a bit more thorough testing
-
rmustacc
jperkin: What was the build failure?
-
richlowe
jperkin: being explicit definitely sounds good, I just don't want anything to change/stop respecting those in fact, if not syntactically.
-
jperkin
rmustacc: I don't have a link to the main failure which is textproc/nlohmann-json that is now a dependency for mkvtoolnix, but in my bulk build to test fixing that I found these two failures were also fixed:
-
jperkin
-
jperkin
-
jperkin
possibly others too (there was one false-positive that has skewed the results a little, I'm waiting for a rebuild to clean that up)
-
rmustacc
OK. Makes me wonder what else is going wrong as the results should be mostly identical. Though I agree with Rich that it's good to just be explicit and that'd be good regardless.
-
richlowe
../../src/ccutil/serialis.h:98:8: error: 'bool tesseract::TFile::DeSerialize(int8_t*, std::size_t)' cannot be overloaded with 'bool tesseract::TFile::DeSerialize(char*, std::size_t)' sounds like a real bug
-
richlowe
you _can't_ rely on char and int8 having the same signedness
-
richlowe
why your change fixes that I'm less sure of
-
richlowe
I guess because the change alan pointed out made C++ thing they were the other way around?
-
richlowe
that would be bad.
-
jperkin
the nlohmann-json failure is in bowels of C++ too, I've never seen it be an issue in C code
-
richlowe
anyway, what your diff does seems reasonable to me, and I'm trying it out somewhere problematic
-
richlowe
what happened to make you notice sounds more important, honestly, and like someone just screwed it all up
-
richlowe
but rm is the expert.
-
richlowe
(because I learned from alan that if you declare someone "the expert" enough, they get stuck with it)
-
jperkin
hah, and like anyone is going to object to robert being labelled an expert on something
-
rmustacc
I'll remember this one.
-
rmustacc
Anyways, the question is probably does the C++ library define some of these on their own and not as typedefs.
-
jperkin
tonight I'll be kicking off a test build which will include rebuilding gcc12 with these changes
-
rmustacc
I guess I need to understand C++ specs which I have not ever really done to date.
-
richlowe
my questions would be does the C++ stew change stuff, did garrett's change just absolutely break C++?
-
richlowe
CTF might be able to answer the latter
-
richlowe
(or dwarfdump, or whatever floats your boat)
-
alanc
so gdamore forgot that defined(__STDC__) can also mean !defined(__cplusplus) ?
-
alanc
though I could also see garrett arguing that breaking C++ is a good thing...
-
richlowe
the first one was my thought.
-
richlowe
the second did also cross my mind
-
tsoome
are there plans to bump libdwarf btw?:)
-
richlowe
to what end?
-
richlowe
I haven't any, but I haven't had reason to, or heard reason to
-
richlowe
if you want to -- and it works -- I certainly wouldn't stop you?
-
richlowe
but I'm sorta busy myself.
-
tsoome
i mean, if I did read it right, ours is from 2020, current is from 2022 and some bugs fixed, as one can imagine:)
-
tsoome
and dwarf5 support added meanwhile...
-
richlowe
sure, but not bugs we have -- that we know of -- experienced.
-
tsoome
I see.
-
richlowe
and since we use our libdwarf for CTF, dwarf4 and dwarf5 are less important since the ctf tools don't understand (fully) anyway, and also we specify v2
-
richlowe
so nobody got to it yet
-
richlowe
but someone _could_
-
tsoome
as usual:)
-
rmustacc
tsoome: I don't have a time frame for it. But it's pretty non-trivial, but could at some point.
-
tsoome
since clang defaults to dwarf5, I was a bit curious and did check what we have/miss. Therefore the question:)
-
richlowe
you need to do what we do with gcc, make it output dwarf2
-
tsoome
yes, I did that too:)
-
richlowe
I'm not actually sure what the differences are for the small amount of dwarf we consume, but they do apparently matter.
-
rmustacc
I meant to at some point try and do dwarf4 as a default and see what breaks with illumos.
-
rmustacc
richlowe: I think the CTF tools are pretty good for dwarf4, fwiw.
-
rmustacc
There was a large effort that last time I did that.
-
richlowe
oh, well that's great at least
-
rmustacc
The CTF tests at the time I last did this all worked well with gcc/clang with both -gdwarf2/4
-
gitomat
[illumos-gate] 15340 cxgbe could make use of firmware loader API -- Andy Fiddaman <illumos⊙fn>
-
richlowe
should we be looking into defaulting to 4 then?
-
rmustacc
Probably.
-
rmustacc
That'd be the next test is diffing everything.
-
richlowe
ctfdiff certainly makes that a more pleasant experience
-
rmustacc
Indeed.
-
rmustacc
Especially with the ctfdump -c making it actually usable.
-
gitomat
[illumos-gate] 15352 acl_get(3sec) return type is wrong -- Bill Sommerfeld <sommerfeld⊙ame>