File: issue158.c

package info (click to toggle)
chibicc 1.0.23.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,832 kB
  • sloc: ansic: 62,911; sh: 275; makefile: 92
file content (31 lines) | stat: -rw-r--r-- 743 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "test.h"
#include <stdint.h>
#include <stddef.h>

#define MPACK_PARENT_NODE(n) (((n) - 1)->pos == (size_t)-1 ? NULL : (n) - 1)

typedef struct mpack_node_s {
  char *tok;
  size_t pos;
  /* flag to determine if the key was visited when traversing a map */
  int key_visited;
  /* allow 2 instances mpack_data_t per node. the reason is that when
   * serializing, the user may need to keep track of traversal state besides the
   * parent node reference */
  char *data[2];
} mpack_node_t;

typedef struct {
  char *parser;
  int reg, ext, unpacking, mtdict;
  char *string_buffer;
} Unpacker;


int main() {
 Unpacker *unpacker;
 mpack_node_t *node;
 if (1 == 0 )
  unpacker->string_buffer + MPACK_PARENT_NODE(node)->pos;
 return 0;
}