Date: Thu, 23 Jun 2022 09:40:26 +0200 From: Bartosz Brachaczek <b.brachaczek@...il.com> To: musl@...ts.openwall.com Cc: He X <xw897002528@...il.com> Subject: Re: g++ fpermissive compilation error for strdupa On Wed, Jun 22, 2022 at 3:19 PM Rich Felker <dalias@...c.org> wrote: > Maybe there's some way we can fix the C++ const issue but make it > produce warnings when strdupa is used in both C and C++...? How about: #define strdupa(strdupa_is_unsafe) strcpy((char *)alloca(strlen(strdupa_is_unsafe)+1),((strdupa_is_unsafe)?0:(long)(strdupa_is_unsafe)<<-1,(strdupa_is_unsafe))) Or is that too ugly? BTW, the C++ issue is not about const, but rather that void * is not convertible to char * (only the other way around).
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.