History log of /netbsd-current/tests/usr.bin/xlint/lint1/gcc_bit_field_types.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.9 28-Mar-2023 rillig

lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html


# 1.8 28-Jan-2023 rillig

tests/lint: document how compilers promote bit-fields


# 1.7 28-Jan-2023 rillig

tests/lint: investigate how compilers interpret bit-fields


Revision tags: netbsd-10-base
# 1.6 15-Jan-2022 rillig

tests/lint: expect complete messages in feature tests

Previously, the tests contained many comments like /* expect: 123 */,
which were useless to a casual reader since nobody is expected to learn
lint's message IDs by heart. Replace these with the complete
diagnostics, to show what lint is complaining about.

The tests named msg_*.c have been left unmodified since they mention the
full message text in their header comment.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.5 04-May-2021 rillig

lint: fix assertion failure when promoting a bit-field larger than int


# 1.4 04-May-2021 rillig

tests/lint: demonstrate assertion failure "len == size_in_bits(INT)"

Seen on sparc64 in hdtoa.c:341 since sparc64 is one of the platforms
that has 128-bit long double and defines struct ieee_ext.ext_frach:48
based on uint64_t, which is a GCC extension. Plain C99 only allows
_Bool, signed int and unsigned int as base type for bit-fields.


# 1.3 02-May-2021 rillig

lint: allow large integer types for bit-fields in GCC mode

These types are explicitly allowed by GCC.

I'm not sure which of the flags -g and -p should be stronger. That is,
if both -g and -p are given, should 'unsigned char' be allowed as a
bit-field type since -g would allow it, or should it be warned about
since -p warns about it? For now, continue to warn about these.


# 1.2 02-May-2021 rillig

tests/lint: fix test for GCC bit-field types

The whole purpose of this test is to try the message about invalid
bit-field types in GCC mode. Therefore, use the default lint1-flags
that include -g.


# 1.1 02-May-2021 rillig

tests/lint: add test for bit-field types in GCC mode


# 1.8 28-Jan-2023 rillig

tests/lint: document how compilers promote bit-fields


# 1.7 28-Jan-2023 rillig

tests/lint: investigate how compilers interpret bit-fields


Revision tags: netbsd-10-base
# 1.6 15-Jan-2022 rillig

tests/lint: expect complete messages in feature tests

Previously, the tests contained many comments like /* expect: 123 */,
which were useless to a casual reader since nobody is expected to learn
lint's message IDs by heart. Replace these with the complete
diagnostics, to show what lint is complaining about.

The tests named msg_*.c have been left unmodified since they mention the
full message text in their header comment.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.5 04-May-2021 rillig

lint: fix assertion failure when promoting a bit-field larger than int


# 1.4 04-May-2021 rillig

tests/lint: demonstrate assertion failure "len == size_in_bits(INT)"

Seen on sparc64 in hdtoa.c:341 since sparc64 is one of the platforms
that has 128-bit long double and defines struct ieee_ext.ext_frach:48
based on uint64_t, which is a GCC extension. Plain C99 only allows
_Bool, signed int and unsigned int as base type for bit-fields.


# 1.3 02-May-2021 rillig

lint: allow large integer types for bit-fields in GCC mode

These types are explicitly allowed by GCC.

I'm not sure which of the flags -g and -p should be stronger. That is,
if both -g and -p are given, should 'unsigned char' be allowed as a
bit-field type since -g would allow it, or should it be warned about
since -p warns about it? For now, continue to warn about these.


# 1.2 02-May-2021 rillig

tests/lint: fix test for GCC bit-field types

The whole purpose of this test is to try the message about invalid
bit-field types in GCC mode. Therefore, use the default lint1-flags
that include -g.


# 1.1 02-May-2021 rillig

tests/lint: add test for bit-field types in GCC mode


# 1.6 15-Jan-2022 rillig

tests/lint: expect complete messages in feature tests

Previously, the tests contained many comments like /* expect: 123 */,
which were useless to a casual reader since nobody is expected to learn
lint's message IDs by heart. Replace these with the complete
diagnostics, to show what lint is complaining about.

The tests named msg_*.c have been left unmodified since they mention the
full message text in their header comment.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.5 04-May-2021 rillig

lint: fix assertion failure when promoting a bit-field larger than int


# 1.4 04-May-2021 rillig

tests/lint: demonstrate assertion failure "len == size_in_bits(INT)"

Seen on sparc64 in hdtoa.c:341 since sparc64 is one of the platforms
that has 128-bit long double and defines struct ieee_ext.ext_frach:48
based on uint64_t, which is a GCC extension. Plain C99 only allows
_Bool, signed int and unsigned int as base type for bit-fields.


# 1.3 02-May-2021 rillig

lint: allow large integer types for bit-fields in GCC mode

These types are explicitly allowed by GCC.

I'm not sure which of the flags -g and -p should be stronger. That is,
if both -g and -p are given, should 'unsigned char' be allowed as a
bit-field type since -g would allow it, or should it be warned about
since -p warns about it? For now, continue to warn about these.


# 1.2 02-May-2021 rillig

tests/lint: fix test for GCC bit-field types

The whole purpose of this test is to try the message about invalid
bit-field types in GCC mode. Therefore, use the default lint1-flags
that include -g.


# 1.1 02-May-2021 rillig

tests/lint: add test for bit-field types in GCC mode


# 1.5 04-May-2021 rillig

lint: fix assertion failure when promoting a bit-field larger than int


# 1.4 04-May-2021 rillig

tests/lint: demonstrate assertion failure "len == size_in_bits(INT)"

Seen on sparc64 in hdtoa.c:341 since sparc64 is one of the platforms
that has 128-bit long double and defines struct ieee_ext.ext_frach:48
based on uint64_t, which is a GCC extension. Plain C99 only allows
_Bool, signed int and unsigned int as base type for bit-fields.


# 1.3 02-May-2021 rillig

lint: allow large integer types for bit-fields in GCC mode

These types are explicitly allowed by GCC.

I'm not sure which of the flags -g and -p should be stronger. That is,
if both -g and -p are given, should 'unsigned char' be allowed as a
bit-field type since -g would allow it, or should it be warned about
since -p warns about it? For now, continue to warn about these.


# 1.2 02-May-2021 rillig

tests/lint: fix test for GCC bit-field types

The whole purpose of this test is to try the message about invalid
bit-field types in GCC mode. Therefore, use the default lint1-flags
that include -g.


# 1.1 02-May-2021 rillig

tests/lint: add test for bit-field types in GCC mode


# 1.3 02-May-2021 rillig

lint: allow large integer types for bit-fields in GCC mode

These types are explicitly allowed by GCC.

I'm not sure which of the flags -g and -p should be stronger. That is,
if both -g and -p are given, should 'unsigned char' be allowed as a
bit-field type since -g would allow it, or should it be warned about
since -p warns about it? For now, continue to warn about these.


# 1.2 02-May-2021 rillig

tests/lint: fix test for GCC bit-field types

The whole purpose of this test is to try the message about invalid
bit-field types in GCC mode. Therefore, use the default lint1-flags
that include -g.


# 1.1 02-May-2021 rillig

tests/lint: add test for bit-field types in GCC mode