This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Failing misc/check-installed-headers-c with new kernel headers.


On 1/16/19 4:21 PM, Florian Weimer wrote:
> * Carlos O'Donell:
> 
>> Should we expand the regexp in some way to ignore text within single-line
>> comments that we can easily detect?
> 
> I think we should use #pragma GCC poison in $cih_test_c, like this:
> 
> diff --git a/scripts/check-installed-headers.sh b/scripts/check-installed-headers.sh
> index 8e7beffd82..f9e39eb995 100644
> --- a/scripts/check-installed-headers.sh
> +++ b/scripts/check-installed-headers.sh
> @@ -144,6 +144,12 @@ EOF
>     inappropriate for this test.  */
>  #undef _LIBC
>  #undef _GNU_SOURCE
> +
> +/* Obsolete type names.  */
> +#pragma GCC poison ushort
> +#pragma GCC poison ulong
> +#pragma GCC poison uint
> +
>  /* The library mode is selected here rather than on the command line to
>     ensure that this selection wins. */
>  $expanded_lib_mode
> 
> And then get rid of the grep.

I like this solution, but it drastically complicates the test.

It's certainly more robust than the regexp.

The problem is that you have to split the tail part of the
test into 2 compilations.

One to test for obsolete types, and another to test for the
correct compilation under the std/macro test matrix.

You can no longer keep the two together because the poison
always triggers on the old types in the base headers.

And when you're looking for poisoning you now have to go
through all the raised compiler errors just like you would
for headers, and exclude any from headers that are allowed
to have the obsolete types.

I guess all-in-all it's more robust, but more work than
I was expecting :/

-- 
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]