You are right, it should throw an error. Gcc simply ignores the statement (and does not generate any code), while GAS calls the function with an argument zero (which doesn't make any sense):
This behavior only occurs for procedures with one and only one parameter.
This makes me think of functions returning by reference with one and only one parameter that must absolutely be surrounded by parentheses for the assignment.
Ultimately, the parser does not like this type of one-parameter syntax, on the left side of assignment expression.
To prevent such cases, I dream of a restriction in the language so that functions can only be called with parentheses and returned values from functions can not be discarded.
You dream of going back and even more!
See below an extract from 'changelog.txt':
Version 1.00.0 (former 0.91.0):
.....
[added]
.....
- Any function result may now be ignored at the call site (simply by not using the function result in any expression or assignment). Previously this was only allowed for functions returning integer types or pointers.
.....