bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #63793] -Wint-conversion warnings in libtextstyle configure script


From: Sam James
Subject: [bug #63793] -Wint-conversion warnings in libtextstyle configure script (Clang 15 incompatibility)
Date: Sat, 11 Feb 2023 15:28:06 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?63793>

                 Summary: -Wint-conversion warnings in libtextstyle configure
script (Clang 15 incompatibility)
                 Project: GNU gettext
               Submitter: thesamesam
               Submitted: Sat 11 Feb 2023 08:28:04 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sat 11 Feb 2023 08:28:04 PM UTC By: Sam James <thesamesam>
GNU gettext's configure script seems to have -Wint-conversion violations which
Clang >= 15 makes error/fatal by default.

The warnings are in the configure script's tests, not from gettext's
compilation.

It's hard to tell if some of these issues are benign/supposed to warn (even if
the error part is new), so apologies if it's not a real issue.

With a fresh gettext clone from today, master at
d4d42aee0e5d0de62278cd0ce3b651e34b533465:
```
$ CC=clang-16 ./configure
[...]

$ grep -rsin "error.*int-conv" --include="config.log"
libtextstyle/config.log:5261:conftest.c:132:8: error: incompatible pointer to
integer conversion returning 'char *' from a function with result type 'int'
[-Wint-conversion]
libtextstyle/config.log:5405:conftest.c:131:8: error: incompatible pointer to
integer conversion returning 'char *' from a function with result type 'int'
[-Wint-conversion]
```

I noticed this originally when diffing old/new config.log with gettext-0.21.1
(these warnings are from configure's output, not building gettext itself):
```
 /usr/bin/x86_64-pc-linux-gnu-ld.bfd:
/var/tmp/portage/sys-devel/gettext-0.21.1/temp/conftest.o: in function
`main':
 
/var/tmp/portage/sys-devel/gettext-0.21.1/work/gettext-0.21.1-abi_x86_64.amd64/libtextstyle/conftest.c:144:
undefined reference to `setupterm'
 /usr/bin/x86_64-pc-linux-gnu-ld.bfd:
/var/tmp/portage/sys-devel/gettext-0.21.1/work/gettext-0.21.1-abi_x86_64.amd64/libtextstyle/conftest.c:145:
undefined reference to `tigetnum'
@@ -768,16 +767,12 @@
 /usr/bin/x86_64-pc-linux-gnu-ld.bfd:
/var/tmp/portage/sys-devel/gettext-0.21.1/temp/conftest.o: in function
`main':
 
/var/tmp/portage/sys-devel/gettext-0.21.1/work/gettext-0.21.1-abi_x86_64.amd64/libtextstyle/conftest.c:129:
undefined reference to `tgetent'
 /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -ltermcap: No such file or
directory
-ignoreme: warning: incompatible pointer to integer conversion returning 'char
*' from a function with result type 'int' [-Wint-conversion]
+ignoreme: error: incompatible pointer to integer conversion returning 'char
*' from a function with result type 'int' [-Wint-conversion]
 return tparam ("\033\133%dm", &buf, 1, 8);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-/usr/bin/x86_64-pc-linux-gnu-ld.bfd:
/var/tmp/portage/sys-devel/gettext-0.21.1/temp/conftest.o: in function
`main':
-/var/tmp/portage/sys-devel/gettext-0.21.1/work/gettext-0.21.1-abi_x86_64.amd64/libtextstyle/conftest.c:130:
undefined reference to `tparam'
-ignoreme: warning: incompatible pointer to integer conversion returning 'char
*' from a function with result type 'int' [-Wint-conversion]
+ignoreme: error: incompatible pointer to integer conversion returning 'char
*' from a function with result type 'int' [-Wint-conversion]
 return tparm ("\033\133%dm", 8);
        ^~~~~~~~~~~~~~~~~~~~~~~~
-/usr/bin/x86_64-pc-linux-gnu-ld.bfd:
/var/tmp/portage/sys-devel/gettext-0.21.1/temp/conftest.o: in function
`main':
-/var/tmp/portage/sys-devel/gettext-0.21.1/work/gettext-0.21.1-abi_x86_64.amd64/libtextstyle/conftest.c:129:
undefined reference to `tparm'
 /usr/bin/x86_64-pc-linux-gnu-ld.bfd:
/var/tmp/portage/sys-devel/gettext-0.21.1/temp/conftest.o:(.data+0x0):
undefined reference to `fabs'
 ignoreme: warning: passing 'volatile double *' to parameter of type 'const
void *' discards qualifiers
[-Wincompatible-pointer-types-discards-qualifiers]
     if (memcmp (&y, &x, sizeof x))
@@ -832,9 +827,6 @@
```

I've attached libtextstyle/config.log from the fresh gettext build with Clang
16.0.0_rc2.

Similar to:
- https://savannah.gnu.org/bugs/?63617 (-Wint-conversion)
- https://savannah.gnu.org/bugs/?63788







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63793>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]