mirror of
https://github.com/Z3Prover/z3
synced 2026-06-20 15:40:37 +00:00
Introduce (and use) a macro for the "trailing array" idiom, so we can disable warnings for this when they're in force.
This commit is contained in:
parent
7e3aad4e17
commit
fe2b6fac24
29 changed files with 93 additions and 36 deletions
|
|
@ -17,6 +17,7 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include "util/sexpr.h"
|
||||
#include "util/trailing_array.h"
|
||||
#include "util/vector.h"
|
||||
#include "util/buffer.h"
|
||||
|
||||
|
|
@ -27,7 +28,7 @@ Notes:
|
|||
|
||||
struct sexpr_composite : public sexpr {
|
||||
unsigned m_num_children;
|
||||
sexpr * m_children[0];
|
||||
TRAILING_ARRAY(sexpr *, m_children);
|
||||
sexpr_composite(unsigned num_children, sexpr * const * children, unsigned line, unsigned pos):
|
||||
sexpr(kind_t::COMPOSITE, line, pos),
|
||||
m_num_children(num_children) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue