[haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.
- From: "pdziepak" <trac@xxxxxxxxxxxx>
- Date: Mon, 13 Jan 2014 18:58:00 -0000
#10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.
---------------------------+----------------------------
Reporter: js | Owner: nobody
Type: enhancement | Status: new
Priority: normal | Milestone: R1
Component: - General | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
---------------------------+----------------------------
Comment (by pdziepak):
Replying to [comment:13 js]:
> About 0004: Clang complains about it with [], but accepts [0], which is
strange. [0] should be equally wrong in C++. Maybe it accepts it as [0] is
a GNU extension? The correct way would be to use [1], but that would break
memory management. I'm not sure about what to do with it. Just change it
to [0] and be done, even though it's still not proper C++? It seems to be
wrong anyway, because memory allocation will be wrong, even with []. So I
think this code is wrong by design and needs to be fixed properly some
day. What do others think?
`options[1]` definitely wouldn't be a correct solution. If we really
wanted to be 100% standard compliant we should remove that member at all,
but that really doesn't look like a good idea. `options[0]` seems fine,
C++ doesn't allow flexible array members and there isn't much we can do
about it.
I really don't see how that flexible array member makes that code "wrong
by design" or breaks memory management.
--
Ticket URL: <http://dev.haiku-os.org/ticket/10402#comment:15>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.
Other related posts:
- » [haiku-bugs] [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- pdziepak
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- pdziepak
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- pdziepak
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- korli
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- korli
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- korli
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- korli
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang. - pdziepak
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- pdziepak
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- js
- » [haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.- waddlesplash