[COMMITTED] S390: Fix non-ascii character in fenv.h.

Message ID 1581495249-12990-1-git-send-email-stli@linux.ibm.com
State New
Headers show
Series
  • [COMMITTED] S390: Fix non-ascii character in fenv.h.
Related show

Commit Message

Stefan Liebler Feb. 12, 2020, 8:14 a.m.
The comment "isn't" contained a non-ascii character which leads to
an error if compiled with -finput-charset=ascii:
error: failure to convert ascii to UTF-8

This is observable in GCC testsuite:
FAIL: 17_intro/headers/c++1998/charset.cc (test for excess errors)
FAIL: 17_intro/headers/c++2011/charset.cc (test for excess errors)
FAIL: 17_intro/headers/c++2014/charset.cc (test for excess errors)
FAIL: 17_intro/headers/c++2017/charset.cc (test for excess errors)
FAIL: 17_intro/headers/c++2020/charset.cc (test for excess errors)

Also rewrite the comment above.

Reported-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
---
 sysdeps/s390/fpu/bits/fenv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
1.8.3.1

Comments

Florian Weimer Feb. 12, 2020, 9:12 a.m. | #1
* Stefan Liebler:

> The comment "isn't" contained a non-ascii character which leads to

> an error if compiled with -finput-charset=ascii:

> error: failure to convert ascii to UTF-8

>

> This is observable in GCC testsuite:

> FAIL: 17_intro/headers/c++1998/charset.cc (test for excess errors)

> FAIL: 17_intro/headers/c++2011/charset.cc (test for excess errors)

> FAIL: 17_intro/headers/c++2014/charset.cc (test for excess errors)

> FAIL: 17_intro/headers/c++2017/charset.cc (test for excess errors)

> FAIL: 17_intro/headers/c++2020/charset.cc (test for excess errors)

>

> Also rewrite the comment above.

>

> Reported-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>


Looks good.

I think we should add -finput-charset=ascii to check-install-headers.
Do you want to send a patch for that?
Andreas Schwab Feb. 12, 2020, 9:33 a.m. | #2
On Feb 12 2020, Stefan Liebler wrote:

> diff --git a/sysdeps/s390/fpu/bits/fenv.h b/sysdeps/s390/fpu/bits/fenv.h

> index 4038f96..e10d025 100644

> --- a/sysdeps/s390/fpu/bits/fenv.h

> +++ b/sysdeps/s390/fpu/bits/fenv.h

> @@ -73,14 +73,14 @@ typedef unsigned int fexcept_t; /* size of fpc */

>  

>  

>  /* Type representing floating-point environment.  This function corresponds

> -   to the layout of the block written by the `fstenv'.  */

> +   to the layout of the block used by fegetenv and fesetenv.  */

>  typedef struct

>  {

>    fexcept_t __fpc;

>    void *__unused;

>    /* The field __unused (formerly __ieee_instruction_pointer) is a relict from

>       commit "Remove PTRACE_PEEKUSER" (87b9b50f0d4b92248905e95a06a13c513dc45e59)

> -     and isn´t used anymore.  */

> +     and isn't used anymore.  */


Perhaps avoid the contraction and write it out as `is not'.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
Stefan Liebler Feb. 12, 2020, 3:57 p.m. | #3
On 2/12/20 10:12 AM, Florian Weimer wrote:
> * Stefan Liebler:

> 

>> The comment "isn't" contained a non-ascii character which leads to

>> an error if compiled with -finput-charset=ascii:

>> error: failure to convert ascii to UTF-8

>>

>> This is observable in GCC testsuite:

>> FAIL: 17_intro/headers/c++1998/charset.cc (test for excess errors)

>> FAIL: 17_intro/headers/c++2011/charset.cc (test for excess errors)

>> FAIL: 17_intro/headers/c++2014/charset.cc (test for excess errors)

>> FAIL: 17_intro/headers/c++2017/charset.cc (test for excess errors)

>> FAIL: 17_intro/headers/c++2020/charset.cc (test for excess errors)

>>

>> Also rewrite the comment above.

>>

>> Reported-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>

> 

> Looks good.

> 

> I think we should add -finput-charset=ascii to check-install-headers.

> Do you want to send a patch for that?

> 


Sure. Please have a look at this patch:
"[PATCH] Use gcc -finput-charset=ascii for check-installed-headers."
https://www.sourceware.org/ml/libc-alpha/2020-02/msg00505.html

Bye,
Stefan
Stefan Liebler Feb. 12, 2020, 4 p.m. | #4
On 2/12/20 10:33 AM, Andreas Schwab wrote:
> On Feb 12 2020, Stefan Liebler wrote:

> 

>> diff --git a/sysdeps/s390/fpu/bits/fenv.h b/sysdeps/s390/fpu/bits/fenv.h

>> index 4038f96..e10d025 100644

>> --- a/sysdeps/s390/fpu/bits/fenv.h

>> +++ b/sysdeps/s390/fpu/bits/fenv.h

>> @@ -73,14 +73,14 @@ typedef unsigned int fexcept_t; /* size of fpc */

>>   

>>   

>>   /* Type representing floating-point environment.  This function corresponds

>> -   to the layout of the block written by the `fstenv'.  */

>> +   to the layout of the block used by fegetenv and fesetenv.  */

>>   typedef struct

>>   {

>>     fexcept_t __fpc;

>>     void *__unused;

>>     /* The field __unused (formerly __ieee_instruction_pointer) is a relict from

>>        commit "Remove PTRACE_PEEKUSER" (87b9b50f0d4b92248905e95a06a13c513dc45e59)

>> -     and isn´t used anymore.  */

>> +     and isn't used anymore.  */

> 

> Perhaps avoid the contraction and write it out as `is not'.

> 

> Andreas.

> 

Yes, I will avoid such contractions in future.
Shall I commit a further patch which for this comment?

Bye,
Stefan

Patch

diff --git a/sysdeps/s390/fpu/bits/fenv.h b/sysdeps/s390/fpu/bits/fenv.h
index 4038f96..e10d025 100644
--- a/sysdeps/s390/fpu/bits/fenv.h
+++ b/sysdeps/s390/fpu/bits/fenv.h
@@ -73,14 +73,14 @@  typedef unsigned int fexcept_t; /* size of fpc */
 
 
 /* Type representing floating-point environment.  This function corresponds
-   to the layout of the block written by the `fstenv'.  */
+   to the layout of the block used by fegetenv and fesetenv.  */
 typedef struct
 {
   fexcept_t __fpc;
   void *__unused;
   /* The field __unused (formerly __ieee_instruction_pointer) is a relict from
      commit "Remove PTRACE_PEEKUSER" (87b9b50f0d4b92248905e95a06a13c513dc45e59)
-     and isn´t used anymore.  */
+     and isn't used anymore.  */
 } fenv_t;
 
 /* If the default argument is used we use this value.  */