[net.lang.c++] pointers to functions returning typedefs in structures

brian@uw-june (Brian Bershad) (09/04/86)

The following won't compile:

--------------------------------
typedef char * memory ;

struct S	{
	memory (*A)(), memory (*B)();	// this is a syntax error
};

---
but
---

Struct S	{
	memory (*A)();
	memory (*B)();
};


will.

I am still running 1.0 relE here... is this something that has been
fixed?

The headache is because the former compiles using /bin/cc and
I am trying to integrate old C code with some new C++ stuff
(this is \supposed/ to work....)


	Brian 

brian@uw-june (Brian Bershad) (09/05/86)

---------------------------------------------------------

In a previous message I said:

>The following won't compile:

>--------------------------------
>typedef char * memory ;
>
>struct S	{
>	memory (*A)(), memory (*B)();	// this is a syntax error
};
>
>---
>but
>---
>
>struct S	{
>	memory (*A)();
>	memory (*B)();
>};
>
>
>will.


Unfortunately, the first (bad) example was not what I wanted to
say  (obviously, it won't compile)... but given:

struct S {
	memory (*A)(), (*B)();
};

(which is what I wanted to say), the compiler croaks.


	Brian