On Sep 26 2018, Geert Uytterhoeven wrote:
> Isn't gcc-8 just assuming that any char array must contain a valid
> NUL-terminated string, unless it is tagged with the nonstring attribute?
No, only if you call strncpy on it and make it potentially
non-terminated.
Andreas.
--
Andreas Schwab,
On Sep 26 2018, Geert Uytterhoeven wrote:
> Isn't gcc-8 just assuming that any char array must contain a valid
> NUL-terminated string, unless it is tagged with the nonstring attribute?
No, only if you call strncpy on it and make it potentially
non-terminated.
Andreas.
--
Andreas Schwab,
Hi Andreas,
On Tue, Jul 24, 2018 at 7:35 PM Andreas Schwab wrote:
> On Jul 23 2018, Randy Dunlap wrote:
> > I don't see that all of these string compare fields are null-terminated.
>
> That gcc has converted the strncmp calls to strcmp is a pretty strong
> evidence that they are.
Isn't gcc-8
Hi Andreas,
On Tue, Jul 24, 2018 at 7:35 PM Andreas Schwab wrote:
> On Jul 23 2018, Randy Dunlap wrote:
> > I don't see that all of these string compare fields are null-terminated.
>
> That gcc has converted the strncmp calls to strcmp is a pretty strong
> evidence that they are.
Isn't gcc-8
On Fri, 27 Jul 2018, Andreas Schwab wrote:
> On Jul 27 2018, Finn Thain wrote:
>
> > Why doesn't gcc convert strncmp to __builtin_strcmp?
>
> It does. In fact, it first converts strncmp to __builtin_strncmp, then
> optimizes it to __builtin_strcmp. Finally, __bultin_strcmp is expanded
> to
On Fri, 27 Jul 2018, Andreas Schwab wrote:
> On Jul 27 2018, Finn Thain wrote:
>
> > Why doesn't gcc convert strncmp to __builtin_strcmp?
>
> It does. In fact, it first converts strncmp to __builtin_strncmp, then
> optimizes it to __builtin_strcmp. Finally, __bultin_strcmp is expanded
> to
On Jul 27 2018, Finn Thain wrote:
> Why doesn't gcc convert strncmp to __builtin_strcmp?
It does. In fact, it first converts strncmp to __builtin_strncmp, then
optimizes it to __builtin_strcmp. Finally, __bultin_strcmp is expanded
to a call to strcmp.
Andreas.
--
Andreas Schwab,
On Jul 27 2018, Finn Thain wrote:
> Why doesn't gcc convert strncmp to __builtin_strcmp?
It does. In fact, it first converts strncmp to __builtin_strncmp, then
optimizes it to __builtin_strcmp. Finally, __bultin_strcmp is expanded
to a call to strcmp.
Andreas.
--
Andreas Schwab,
On Thu, 26 Jul 2018, Randy Dunlap wrote:
> >
> > The untested patch below may work. It seems that it may be relevant to
> > both arc and m68k:
>
>
> I got back to looking at the build errors. I agree with Andreas that
> all of the fields in question are null-terminated, so Finn's patch
On Thu, 26 Jul 2018, Randy Dunlap wrote:
> >
> > The untested patch below may work. It seems that it may be relevant to
> > both arc and m68k:
>
>
> I got back to looking at the build errors. I agree with Andreas that
> all of the fields in question are null-terminated, so Finn's patch
On 07/23/2018 09:49 PM, Finn Thain wrote:
> On Mon, 23 Jul 2018, Randy Dunlap wrote:
>
>> On 07/20/2018 12:20 AM, Andreas Schwab wrote:
>>> On Jul 19 2018, Randy Dunlap wrote:
>>>
block/partitions/ldm.o: In function `ldm_partition':
ldm.c:(.text+0x1900): undefined reference to `strcmp'
On 07/23/2018 09:49 PM, Finn Thain wrote:
> On Mon, 23 Jul 2018, Randy Dunlap wrote:
>
>> On 07/20/2018 12:20 AM, Andreas Schwab wrote:
>>> On Jul 19 2018, Randy Dunlap wrote:
>>>
block/partitions/ldm.o: In function `ldm_partition':
ldm.c:(.text+0x1900): undefined reference to `strcmp'
On Jul 23 2018, Randy Dunlap wrote:
> I don't see that all of these string compare fields are null-terminated.
That gcc has converted the strncmp calls to strcmp is a pretty strong
evidence that they are.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5
On Jul 23 2018, Randy Dunlap wrote:
> I don't see that all of these string compare fields are null-terminated.
That gcc has converted the strncmp calls to strcmp is a pretty strong
evidence that they are.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5
On Mon, 23 Jul 2018, Randy Dunlap wrote:
> On 07/20/2018 12:20 AM, Andreas Schwab wrote:
> > On Jul 19 2018, Randy Dunlap wrote:
> >
> >> block/partitions/ldm.o: In function `ldm_partition':
> >> ldm.c:(.text+0x1900): undefined reference to `strcmp'
> >> ldm.c:(.text+0x1964): undefined
On Mon, 23 Jul 2018, Randy Dunlap wrote:
> On 07/20/2018 12:20 AM, Andreas Schwab wrote:
> > On Jul 19 2018, Randy Dunlap wrote:
> >
> >> block/partitions/ldm.o: In function `ldm_partition':
> >> ldm.c:(.text+0x1900): undefined reference to `strcmp'
> >> ldm.c:(.text+0x1964): undefined
On 07/20/2018 12:20 AM, Andreas Schwab wrote:
> On Jul 19 2018, Randy Dunlap wrote:
>
>> block/partitions/ldm.o: In function `ldm_partition':
>> ldm.c:(.text+0x1900): undefined reference to `strcmp'
>> ldm.c:(.text+0x1964): undefined reference to `strcmp'
>> drivers/rtc/rtc-proc.o: In function
On 07/20/2018 12:20 AM, Andreas Schwab wrote:
> On Jul 19 2018, Randy Dunlap wrote:
>
>> block/partitions/ldm.o: In function `ldm_partition':
>> ldm.c:(.text+0x1900): undefined reference to `strcmp'
>> ldm.c:(.text+0x1964): undefined reference to `strcmp'
>> drivers/rtc/rtc-proc.o: In function
On 07/19/2018 10:17 PM, Finn Thain wrote:
> On Thu, 19 Jul 2018, Randy Dunlap wrote:
>
>> Hi Geert,
>>
>> I am seeing a few errors when cross-building m68k on x86_64, using the
>> toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/
>> (thanks, Arnd). (so this is gcc 8.1.0)
>>
>>
On 07/19/2018 10:17 PM, Finn Thain wrote:
> On Thu, 19 Jul 2018, Randy Dunlap wrote:
>
>> Hi Geert,
>>
>> I am seeing a few errors when cross-building m68k on x86_64, using the
>> toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/
>> (thanks, Arnd). (so this is gcc 8.1.0)
>>
>>
On Jul 19 2018, Randy Dunlap wrote:
> block/partitions/ldm.o: In function `ldm_partition':
> ldm.c:(.text+0x1900): undefined reference to `strcmp'
> ldm.c:(.text+0x1964): undefined reference to `strcmp'
> drivers/rtc/rtc-proc.o: In function `is_rtc_hctosys':
> rtc-proc.c:(.text+0x290): undefined
On Jul 19 2018, Randy Dunlap wrote:
> block/partitions/ldm.o: In function `ldm_partition':
> ldm.c:(.text+0x1900): undefined reference to `strcmp'
> ldm.c:(.text+0x1964): undefined reference to `strcmp'
> drivers/rtc/rtc-proc.o: In function `is_rtc_hctosys':
> rtc-proc.c:(.text+0x290): undefined
On Thu, 19 Jul 2018, Randy Dunlap wrote:
> Hi Geert,
>
> I am seeing a few errors when cross-building m68k on x86_64, using the
> toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/
> (thanks, Arnd). (so this is gcc 8.1.0)
>
> block/partitions/ldm.o: In function `ldm_partition':
On Thu, 19 Jul 2018, Randy Dunlap wrote:
> Hi Geert,
>
> I am seeing a few errors when cross-building m68k on x86_64, using the
> toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/
> (thanks, Arnd). (so this is gcc 8.1.0)
>
> block/partitions/ldm.o: In function `ldm_partition':
Hi Geert,
I am seeing a few errors when cross-building m68k on x86_64, using the
toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/ (thanks,
Arnd).
(so this is gcc 8.1.0)
block/partitions/ldm.o: In function `ldm_partition':
ldm.c:(.text+0x1900): undefined reference to `strcmp'
Hi Geert,
I am seeing a few errors when cross-building m68k on x86_64, using the
toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/ (thanks,
Arnd).
(so this is gcc 8.1.0)
block/partitions/ldm.o: In function `ldm_partition':
ldm.c:(.text+0x1900): undefined reference to `strcmp'
26 matches
Mail list logo