Given:
void function(int*=0) {}
int main() {
}
clang (3.8.0):
test.cc:1:18: error: expected ')'
void function(int*=0) {
^
g++ (5.4.0):
test.cc:1:18: error: expected ‘,’ or ‘...’ before ‘*=’ token
void function(int*=0) {
^
If I change it to (note the spacing):
void function(int* = 0) {}
int main() {
}
Obviously it's getting confused whether I'm typing T* = 0 or T *= 0, is this a bug or expected?