#include <stdlib.h>

int main()
{
    char* s = malloc(128);
    return 0;
}

This will compile with gcc, but not with g++. C++ requires an explicit cast from

void*