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'.

Example if having a call (from another file) as

      test_unused_string_param_gc("This string is not garbage-collected?");

Then this string will still be added to our finally build binary?

We compile with -Os, and have tried different flags to try get rid of this dead 
parameter data,
do anyone know if this is the expected behavior and why? Or if we are missing 
any optimization flags, like LTO etc?

Best Regards,
Fredrik

Reply via email to