As a workaround, placing the pragma at the top of the function body statement block works, see f4:
class t2
{
void f1()
{
}
#pragma warning (push)
#pragma warning (disable : 26434)
void f2()
#pragma warning (pop)
{
}
#pragma warning (push)
#pragma warning (disable : 26434)
void f3()
{
}
#pragma warning (pop)
#pragma warning (push)
#pragma warning (disable : 26434)
void f4()
{
#pragma warning (pop)
}
};