Hi,
We have a function that does not used an in-parameter, simplified example:
void test_unused_string_param_gc(const char* unused)
{
// empty
}
Though when we have calls to this function, the arguments are still put in the
memory, causing unnecessary flash memory usage for 'dead parameters'
I have a question about array index bounds check that I do not fully understand.
Compiling the code below, I get warnings for out-of-bounds in one case, but not
the other,
also printf output gets different, but should be same?
Maybe someone can explain what is going on, and if observed behavior is
> From: Segher Boessenkool
> Sent: Thursday, June 6, 2019 6:49 PM
> To: Richard Earnshaw (lists)
> Cc: Fredrik Hederstierna; Jeff Law; gcc@gcc.gnu.org
> Subject: Re: ARM peephole2 from 2003 never merged, still valid
>
>
> On Thu, Jun 06, 2019 at 05:06:35PM
> From: Segher Boessenkool
> Sent: Thursday, June 6, 2019 4:02 PM
> To: Richard Earnshaw (lists)
> Cc: Jeff Law; Fredrik Hederstierna; gcc@gcc.gnu.org
> Subject: Re: ARM peephole2 from 2003 never merged, still valid
> That doesn't stop combine from considering it. It d
b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-01 Fredrik Hederstierna
+Tamas Gergely
+
+ * gcc/config/arm/arm.md: new peephole2 pattern added for extending
+ move and compare parallelization. Retake from 2003 patch adapted.
+
2019-06-01 Martin Sebor
PR middle-end
patch:
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 20bdc2bec37..4c924499ad9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-01 Fredrik Hederstierna
+Tamas Gergely
+
+ * gcc/config/arm/arm.md: new peephole2 pattern added for extending
+ move
Hi
When reading the SEI CERT C Coding Standard rules, looking at
"DCL30-C. Declare objects with appropriate storage durations"
it seem like GCC does not warn in compile-time for some noncompliant examples.
I know eg AddressSanitizer and several runtime running tools finds these bugs,
but it would
Hi
This is a general question to all you working with GCC benchmarking.
I have been working with code benchmarks like CSiBE for ARM.
>From time to time unpredicted results appears where numbers gets worse by no
>reason.
When looking into what could cause this unpredictable behaviour, I found th
Hi,
I have a question about loop induction variables, related to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67213
Consider a simple loop like
int ix;
for (ix = 0; ix < 6; ix++) {
data[ix] = ix;
}
In this case variable 'ix' is used as counting variable for array index,
but also used
>> Couldn't this be compiled to as the following, with using r12 'ip':
>>
>> :
>> 0: push {r4, lr}
>> 4: mov r4, r0
>> 8: ldr ip, [r0]
>> c: bl 0
>> 10: str ip, [r4]
>> 14: pop {r4, pc}
>>
>
>No. IP cna be clobbered either by func i
Hi,
I from time to time get the impression that the inter procedure scratch
register r12 (ip) is not used as often as it might on ARM.
Example, compiled with GCC-6.2 for arm966e-s ARM with arm-none-eabi-gcc target:
struct data {
int flags;
};
extern void* func(struct data* dp);
struct data*
Some processor architectures do support bitwise access to memory, eg. ARM
Cortex-M and 8051 (by ARM called bit-banding).
In these architectures a single bit can somewhat be addressable, but only as an
'aliased' memory region for another memory address.
I noticed that Keil ARMCC compiler now seem
>> GCC does warn if returning a pointer to a local variable (stack memory).
>> But there are alot of more cases where GCC could possibly warn,
>> eg. when references are made to local variables or stack memory.
>>
>> See this attached example code.
>> GCC warns for first case, but not the others.
f(p = NULL); /* No warning? */
f((const char*)NULL); /* gives warning */
f(NULL); /* gives warning */
return 0;
}
static void f(const char *s)
{
printf("%s",s);
}
Thanks & Best Regards
Fredrik Hederstierna
> Not that I know of, and personally I think it's a terrible idea,
Ok, you might be right, but I'm curious why you think it's so terrible though.
Is it becasue GCC hardly can be considered a "safe" compiler by the
standardisation organisations due to the nature of the development process,
which
Hi
Do anyone know if there exist any project to get GCC support checking of MISRA
C rules? Otherwise, do anyone think this is a good idea?
BR,
Fredrik
16 matches
Mail list logo