== Why is this an issue?

Conversion of a function pointer to a non-function pointer type causes undefined behaviour. Undefined behaviour may arise if a function call is made using a pointer that is the result of a function pointer conversion.


=== Noncompliant code example

[source,cpp]
----
void f ( int32_t )
{ 
 ( void (*)() ) &f; // Noncompliant, conversion to a function pointer type with different prototype
 ( void * ) &f; // Noncompliant, conversion to a non-function pointer type
}
----


== Resources

* MISRA {cpp}:2008, 5-2-6


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Remove this hazardous cast from "xxx" to "yyy".


endif::env-github,rspecator-view[]
