Error for function parameter of user-defined type

I'm guessing that I'm missing something fundamental here, and hoping someone can point it out to me.
I want to have a function parameter whose type is user-defined. There are three functions in the following code, abc, pqr, and stu. All of them are accepted, except stu, which produces these error messages:

user_types_test:3: error: variable or field 'stu' declared void
user_types_test:3: error: 'T3L' was not declared in this scope

The code in question is:

typedef struct { int p ;  // number of pin the lead for the Green internal LED is attached to
               } T3L ;

T3L t1 ;

void pqr( T3L parm_name ) ; // function declaration 

void abc( int parm_name ) { return ; } ;  // function definition with built-in type

void stu( T3L parm_name ) { return ; } ;  // function definition with user-defined type

void setup() {}
void loop() {}

And yes, the error message points to an empty line (line 3), so that is completely useless.
To make the message go away and prove to yourself that everything else is good, merely comment out the line for stu.

I'm not sure what to think. For one thing, I can't tell if the compiler is applying standard C rules, or those for C++.
Any ideas?

You aren't supposed to be using grown-up concepts such as user-defined types in Arduino - the pre-processor was written on the assumption that you would only ever use standard types in your function signatures. I have no idea who thought that was a sensible assumption, but presumably it's the same person who thought the whole concept of auto-generated function prototypes was a good idea, and then produced such a poor implementation.

You can work around the issue by putting your type definitions and declarations in a separate header file and #including it in your sketch. In some IDE versions I think you can also work around it by putting your own function prototypes in the correct place i.e. after your type declarations and definitions. (In other IDE versions the IDE will ignore those and go ahead with its own prototypes, which it will put in the wrong place so that they won't compile.)

Thank you for such a great explanation! I'll give it a try.