Products

2024-05-05 Thread Justin Taylor
Hello,


We would like to purchase your product. Would you mind sharing 
your catalog with us?


Thank you!

Justin


strtol(3) with QChar arguments

2024-05-05 Thread Alejandro Colomar via Gcc
Hi Martin,

I was wondering why C23 didn't use QChar for strtol(3).  It has the same
problems that string functions have: a const input string and a
non-const output string (the endptr).

I think endptr should have the same constness of the string passed to
strtol(3), no?

Should this be addressed for C3x?  For liba2i.git, I'm working on
const-generic versions of strtol(3) wrappers, which have helped simplify
the const/non-const mix of pointers in shadow.git.

Have a lovely day!
Alex

-- 

A client is hiring kernel driver, mm, and/or crypto developers;
contact me if interested.


signature.asc
Description: PGP signature


Re: strtol(3) with QChar arguments

2024-05-05 Thread Martin Uecker via Gcc
Am Sonntag, dem 05.05.2024 um 15:13 +0200 schrieb Alejandro Colomar:
> Hi Martin,
> 
> I was wondering why C23 didn't use QChar for strtol(3).  It has the same
> problems that string functions have: a const input string and a
> non-const output string (the endptr).

I am not sure whether strtol was discussed.

> 
> I think endptr should have the same constness of the string passed to
> strtol(3), no?
> 
> Should this be addressed for C3x?  For liba2i.git, I'm working on
> const-generic versions of strtol(3) wrappers, which have helped simplify
> the const/non-const mix of pointers in shadow.git.

One potential issue is that for strtol such a change would break
all callers that pass a const-qualified pointer as first argument
and provide an argument for enptr second, which now has to be
a pointer to a non-const pointer.

For the functions we changed this breaks only cases where
a const qualified pointer is passed and then the result
is assigned to a non-const pointer, which could already be
considered questionable in existing code.

Martin

> 
> Have a lovely day!
> Alex
> 



Re: strtol(3) with QChar arguments

2024-05-05 Thread Alejandro Colomar via Gcc
Hi Martin,

On Sun, May 05, 2024 at 04:47:21PM +0200, Martin Uecker wrote:
> Am Sonntag, dem 05.05.2024 um 15:13 +0200 schrieb Alejandro Colomar:
> > Hi Martin,
> > 
> > I was wondering why C23 didn't use QChar for strtol(3).  It has the same
> > problems that string functions have: a const input string and a
> > non-const output string (the endptr).
> 
> I am not sure whether strtol was discussed.
> 
> > 
> > I think endptr should have the same constness of the string passed to
> > strtol(3), no?
> > 
> > Should this be addressed for C3x?  For liba2i.git, I'm working on
> > const-generic versions of strtol(3) wrappers, which have helped simplify
> > the const/non-const mix of pointers in shadow.git.
> 
> One potential issue is that for strtol such a change would break
> all callers that pass a const-qualified pointer as first argument
> and provide an argument for enptr second, which now has to be
> a pointer to a non-const pointer.

Yep, it is more aggressive with existing code than e.g. strchr(3).

> 
> For the functions we changed this breaks only cases where
> a const qualified pointer is passed and then the result
> is assigned to a non-const pointer, which could already be
> considered questionable in existing code.

Hmmm, okay.  I'll then just provide my library to replace strtol(3)
calls, and hope that programmers switch to it voluntarily.

Thanks!

Have a lovely day!
Alex

-- 

A client is hiring kernel driver, mm, and/or crypto developers;
contact me if interested.


signature.asc
Description: PGP signature


gcc-15-20240505 is now available

2024-05-05 Thread GCC Administrator via Gcc
Snapshot gcc-15-20240505 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/15-20240505/
and on various mirrors, see https://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 15 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch master 
revision 21e7aa5f3ea44ca2fef8deb8788edffc04901b5c

You'll find:

 gcc-15-20240505.tar.xz   Complete GCC

  SHA256=2419686e0217328ae56f517995376367e5190ed84b31f90f7035cb1464603519
  SHA1=c3bf3424d3907cf7b5e5b1a6b5b0815dfad4ef87

Diffs from 15-20240428 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-15
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.