Investigate C11 _Static_assert compiler support, and make MOZ_STATIC_ASSERT expand to it when possible to do so without warnings
Categories
(Core :: MFBT, defect)
Tracking
()
People
(Reporter: Waldo, Assigned: kylma, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=c])
Attachments
(1 file, 2 obsolete files)
|
2.14 KB,
patch
|
Waldo
:
feedback+
|
Details | Diff | Splinter Review |
| Reporter | ||
Updated•14 years ago
|
Comment 1•13 years ago
|
||
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
| Reporter | ||
Updated•12 years ago
|
Comment 4•12 years ago
|
||
| Reporter | ||
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
Comment 9•11 years ago
|
||
Updated•11 years ago
|
| Assignee | ||
Comment 10•11 years ago
|
||
| Assignee | ||
Updated•11 years ago
|
| Reporter | ||
Comment 11•11 years ago
|
||
| Reporter | ||
Comment 12•11 years ago
|
||
Comment 13•11 years ago
|
||
| Assignee | ||
Comment 14•11 years ago
|
||
Comment 15•11 years ago
|
||
| Reporter | ||
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Comment 18•11 years ago
|
||
| Assignee | ||
Comment 19•11 years ago
|
||
| Reporter | ||
Comment 20•11 years ago
|
||
Updated•5 years ago
|
| Reporter | ||
Comment 21•5 years ago
|
||
We removed MOZ_STATIC_ASSERT some time ago in favor of just using C++11 static_assert directly. And we don't really have that much pure C code at all any more (and where possible I try to push back on our adding any more), so there just isn't a need for this any more.
Comment 22•5 years ago
|
||
(In reply to Jeff Walden [:Waldo] from comment #21)
We removed
MOZ_STATIC_ASSERTsome time ago in favor of just using C++11static_assertdirectly. And we don't really have that much pure C code at all any more (and where possible I try to push back on our adding any more), so there just isn't a need for this any more.
MOZ_STATIC_ASSERT is currently used only in libmar C code:
I have a patch to replace libmar's MOZ_STATIC_ASSERTs with static_assert (C11's macro #defined in assert.h as C11's _Static_assert keyword), but that requires compiling mozilla-central's C code as C11 instead of C99 (-std=gnu99). And that, unsurprisingly, opens more rat holes. I have a WIP on my back burner but no ETA.
Updated•5 years ago
|
Description
•