cheusov
736f809ed1
cmp.c: use C99 strtoll(3) instead of legacy strtoq(3)
2021-03-20 14:27:47 +00:00
rillig
daef7ea921
lint: properly name C99 in message about declaration after statement
...
Now that C99 has been released and published, there is no reason anymore
to refer to it as C9X.
2021-03-20 14:17:56 +00:00
rillig
363ba317d3
tests/lint: add test for declaration after statement
2021-03-20 14:13:51 +00:00
rillig
b925668ec9
lint: use proper boolean literals instead of 0/1
...
The code in the C grammar is generated by yacc and is not checked by
lint's strict bool mode, therefore the replacement was done manually.
No change to the resulting change.
2021-03-20 13:53:28 +00:00
rillig
e4fa7e61a5
lint: update comment on setasm for C99
...
No functional change.
2021-03-20 13:25:31 +00:00
rillig
4f4415984d
lint: reduce indentation and braces in merge_type_specifiers
...
No functional change.
2021-03-20 13:22:06 +00:00
rillig
e305d7be33
lint: extract adjusting of the storage class into separate function
...
No functional change.
2021-03-20 13:06:05 +00:00
rillig
1cf2c45884
lint: document the struct for declarations more precisely
...
No functional change.
2021-03-20 13:00:43 +00:00
rillig
d37415b4e9
lint: remove unnecessary '%prec T_COMMA' from grammar
...
My previous commit message was wrong in saying that the '%prec' was
necessary. It is not necessary.
Most probably I misspelled the name of the grammar rule as opt_comma
instead of comma_opt, which would lead to the same number of conflicts
in the grammar plus a warning, but no build failure.
2021-03-20 11:33:50 +00:00
rillig
941875ba2d
lint: join grammar rules for initialization
...
The '%prec T_COMMA' is necessary to avoid lots of parse errors in the
lint1 unit tests. Curiously, further down in the grammar, for compound
literals, the '%prec T_COMMA' is not necessary, even though the context
looks very similar.
No functional change.
2021-03-20 11:24:49 +00:00
rillig
5f7e254669
lint: fix grammar for initialization
...
Previously, the grammar syntactically accepted the following code:
int var = .member = 12345;
The designation '.member =' can only be used with brace-enclosed
initializers.
2021-03-20 11:05:16 +00:00
rillig
b61f069794
lint: align rule names in grammar with C99
...
No functional change.
2021-03-20 10:32:43 +00:00
rillig
a11859207b
tests/lint: add more tests for initialization, based on C99 6.7.8
2021-03-20 08:59:46 +00:00
rillig
80b7b20b36
lint: fix assertion failure after error in designation
...
In d_c99_init.c, the initialization of array_with_designator failed.
The designator '.member' from that initialization was not cleaned up
before starting the next initialization.
2021-03-20 08:54:27 +00:00
rillig
88e315e145
lint: replace segmentation fault with assertion failure
2021-03-20 08:16:30 +00:00
skrll
d312f2c65b
Don't mark EFI runtime pages LX_BLKPAG_OS_READ | LX_BLKPAG_OS_WRITE as
...
these bits are only used by the current pmap fault code and these are
wired pages which will never fault.
2021-03-20 06:48:23 +00:00
skrll
ea0b29cd75
Apply the
...
earlyconsgetc: return -1 instead of 0 because we will never produce input
fix to all copies.
2021-03-20 05:58:22 +00:00
isaki
7a7ca36496
Fix and improve the buffer length calculation to avoid zero length
...
even if blk_ms is small.
This fixes PR kern/56059.
2021-03-20 04:56:52 +00:00
rillig
1a007aec0b
lint: improve debug loggin for initialization
2021-03-19 18:17:46 +00:00
rillig
c6daba3cac
tests/lint: add comma to struct initialization
...
This places the error marker one line up, where it is expected.
2021-03-19 17:40:37 +00:00
rillig
a8fb7d4818
lint: rename designator_pop_name to designator_shift_name
...
The entries are removed from the beginning, not from the end.
No functional change.
2021-03-19 17:37:57 +00:00
jmcneill
bdf24698dc
earlyconsgetc: return -1 instead of 0 because we will never produce input
2021-03-19 10:23:34 +00:00
rillig
4c27df2433
lint: use standard form of statement macro for debug_node
...
No functional change.
2021-03-19 08:23:39 +00:00
rillig
5acb533d3d
lint: rename in_bit to in_bits
...
No functional change.
2021-03-19 08:21:26 +00:00
rillig
527774e33b
lint: rename tsize to type_size_in_bits
...
The shorter name size_in_bits was already taken by the function-like
macro with argument type tspec_t.
No functional change.
2021-03-19 08:19:24 +00:00
rillig
91bffee2de
tests/lint: add test for incompatible pointer types in return
2021-03-19 08:01:58 +00:00
rillig
19ff95ceea
lint: add reminder that C99 does not allow '{}' in initializer
...
No functional change.
2021-03-19 07:54:13 +00:00
skrll
a99e7efc87
Support pmap_growkernel and KASAN shadow mapping of the new KVA.
...
Neither mips nor ppc booke actually use pmap_growkernel (at present).
Thanks to rin@ for testing a similar patch on ppc booke.
2021-03-19 07:51:33 +00:00
rillig
0b45cbea90
lint: replace assertion in initialization with proper error message
2021-03-19 01:02:52 +00:00
rillig
674baf6361
lint: rename push_member and pop_member
...
These two functions are supposed to model the designator that is used
for initializing structs and arrays. The implementation is still buggy
and does not work at all for C99 designators with multiple names, see
d_init_pop_member.c.
For now, just rename the functions to head in the right direction.
No functional change.
2021-03-19 00:55:02 +00:00
simonb
7f74343bad
Sprinkle a few more \n's and the end of some debug printfs.
2021-03-19 00:44:09 +00:00
rillig
bde88c228c
lint: extend documentation about initialization
...
No functional change.
2021-03-19 00:39:17 +00:00
rillig
89239b6de5
lint: split initstack_pop_item into separate functions
...
No functional change.
2021-03-19 00:19:32 +00:00
rillig
e2bce8130d
lint: improve debug logging in initstack_push
...
No functional change outside debug mode.
2021-03-19 00:08:13 +00:00
rillig
dc7202e285
lint: split initstack_push into smaller functions
...
No functional change.
2021-03-18 23:45:20 +00:00
rillig
d68805fd28
lint: clean up control flow in initstack_push
...
No functional change.
2021-03-18 23:37:31 +00:00
rillig
77fa05a23f
lint: extract extend_if_array_of_unknown_size from initstack_push
...
No functional change.
2021-03-18 23:23:40 +00:00
simonb
2982f46e1a
Add PTRACE_ILLEGAL_ASM using the MIPS32r6/MIPS64r6 backwards and
...
forwards compatible "sigrie" instruction to generate a Reserved
Instruction trap.
2021-03-18 23:18:36 +00:00
rillig
d30c5846db
lint: replace undefined behavior during initialization with assertion
...
This only affects code that is already rejected by the compiler.
2021-03-18 22:51:32 +00:00
rillig
b4cc35448b
lint: improve debug logging during initialization
...
No functional change outside debug mode.
2021-03-18 22:08:05 +00:00
rillig
5f25f85e8f
lint: make the debug log for nodes more readable
...
The operator NAME has the name 'name', therefore no special case is
needed.
Having the words 'with type' in the message makes the message easier to
find from the debug log. Given that the operator name is used unquoted,
the log message 'name: int value=111' was nearly impossible to find in
the code.
Replace the '()' with an actual word, to avoid any confusion about
whether the type name might be a function type without prototype.
Reduce the amount of '=' signs, instead use commas to separate the
properties of the node.
No functional change outside debug mode.
2021-03-18 22:05:33 +00:00
rillig
b1117d0cb9
lint: rename operator 'const' to 'constant'
...
The previous name could be too easily confused with the type qualifier
'const'. The operator name is mainly used in the debug log, only
occasionally in the output. Since 'constant' is not a "real" operator,
it probably doesn't occur in messages at all.
2021-03-18 21:56:34 +00:00
rillig
ebe3bde9bf
lint: reword message about type mismatch in initialization
...
Using parentheses for quotes is unusual, furthermore the previous
message didn't follow proper grammar rules, sacrificing clarity for
brevity.
2021-03-18 21:26:56 +00:00
rillig
79d8eaa978
tests/lint: add test for type mismatch in initialization
...
Copied and adapted from d_c99_init.c.
2021-03-18 21:20:21 +00:00
rillig
d254ff0ed7
tests/lint: warning 210 has type information by now
2021-03-18 20:58:02 +00:00
rillig
e82f0a6950
lint: reduce debug logging for initialization, update documentation
...
No functional change outside debug mode.
2021-03-18 20:55:58 +00:00
rillig
ce64b8cc18
lint: document how initialization works, improve debug logging
...
No functional change outside debug mode.
2021-03-18 20:22:50 +00:00
rillig
0dfa224bf0
tests/lint: add more examples for initialization
2021-03-18 20:20:55 +00:00
cheusov
6e95ab06dc
mtree: use POSIX type uint32_t instead of u_int32_t
2021-03-18 20:02:18 +00:00
cheusov
37e902b261
join.c: print usage after warning "illegal option..." as it was originally intended
2021-03-18 19:47:41 +00:00