typedef error 
Author Message
 typedef error

Please email if you could:
==================

I have this structure and thee compiler gave me an error message( see
below) why???

#pragma pack()
typedef struct  {
    word    riptr;          /* Rx internal temporary data pointer. */
     ulng    tcrc;       /* Temp transmit CRC */
    union {
                 t_HdlcFcc_Pram    h;    <----- line 310
                 t_EnetFcc_Pram    e;
                } SpecificProtocol;

Quote:
} _PackedType  t_Fcc_Pram;

line 310: A type or a storage class must
 be specified in a declaration


Sat, 21 Apr 2001 03:00:00 GMT  
 typedef error


Quote:
>Please email if you could:
>==================

>I have this structure and thee compiler gave me an error message( see
>below) why???

>#pragma pack()
>typedef struct  {
>    word    riptr;          /* Rx internal temporary data pointer. */
>     ulng    tcrc;       /* Temp transmit CRC */
>    union {
>                 t_HdlcFcc_Pram    h;    <----- line 310
>                 t_EnetFcc_Pram    e;
>                } SpecificProtocol;
>} _PackedType  t_Fcc_Pram;

>line 310: A type or a storage class must
> be specified in a declaration

Presumably t_HdlcFcc_Pram hasn't previously been defined as a type. If
t_HdlcFcc_Pram has a previous definition then you will need to show it,
otherwise that is your problem.

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


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



Sun, 22 Apr 2001 03:00:00 GMT  
 typedef error

Quote:

> Please email if you could:
> ==================

> I have this structure and thee compiler gave me an error message( see
> below) why???

> #pragma pack()
> typedef struct  {
>     word    riptr;          /* Rx internal temporary data pointer. */
>      ulng    tcrc;       /* Temp transmit CRC */
>     union {
>                  t_HdlcFcc_Pram    h;    <----- line 310
>                  t_EnetFcc_Pram    e;
>                 } SpecificProtocol;
> } _PackedType  t_Fcc_Pram;

So where is the typedef?  It looks like t_HdlcFcc_Pram is
not a recognized typename from the error you get.


Sun, 22 Apr 2001 03:00:00 GMT  
 typedef error

Quote:

> Please email if you could:

Hi Nameir Ismeil,

If you ask in a newsgroup, you should be prepared and willing to read
the answer in the newsgroup.

Quote:
> I have this structure and thee compiler gave me an error message( see
> below) why???

> #pragma pack()
> typedef struct  {
>     word    riptr;          /* Rx internal temporary data pointer. */
>     ulng    tcrc;       /* Temp transmit CRC */
>     union {
>                  t_HdlcFcc_Pram    h;    <----- line 310
>                  t_EnetFcc_Pram    e;
>                 } SpecificProtocol;
> } _PackedType  t_Fcc_Pram;

> line 310: A type or a storage class must
>  be specified in a declaration

Please give the definitions of all your special types, like "word",
"ulng",  "t_HdlcFcc_Pram" and "t_EnetFcc_Pram" to allow a thorough
analysis of your code. It would be best if you posted a complete
minimal ANSI-C sample program that still reproduces the error.

It looks like the compiler does not know what "t_HdlcFcc_Pram" is
when it reaches line 310.

Stephan
(initiator of the campaign against grumpiness in c.l.c)



Sun, 22 Apr 2001 03:00:00 GMT  
 typedef error

Quote:
> Please email if you could:
> ==================

> I have this structure and thee compiler gave me an error message( see
> below) why???

> #pragma pack()
> typedef struct  {
>     word    riptr;          /* Rx internal temporary data pointer. */
>      ulng    tcrc;       /* Temp transmit CRC */
>     union {
>                  t_HdlcFcc_Pram    h;    <----- line 310
>                  t_EnetFcc_Pram    e;
>                 } SpecificProtocol;
> } _PackedType  t_Fcc_Pram;

> line 310: A type or a storage class must
>  be specified in a declaration

The compiler needs to know what a "t_HdlcFcc_Pram" is. Maybe include the
header that defines it or provide for it yourself.

--
<<<<<<<<<<  Blue Skies  >>>>>>>>>>>
<        Michael J. Tobler        >

< remove "no-spam-" when replying >
<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>



Tue, 24 Apr 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. RE Typedef Errors

2. typedef error

3. typedef error

4. typedef error

5. typedef error

6. Typedef structs within typedef structs...

7. Typedef structs within typedef structs...

8. To typedef or not to typedef, that is the question

9. Error C2143 defining a typedef for a stl list

10. Error with map typedef, porting from VC6 project

11. comp error: typedef + template

12. VC7 Error C2535 with silly map typedef

 

 
Powered by phpBB® Forum Software