I’m compiling some C code, and I get the error
typedef 'A' is initialized (use decltype instead)
On one of my struct declarations. What could be causing this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am able to reproduce that with the simple program
typedefdeclares an alias to a type; it does not declare a variable. So if you want an instance ofstruct my_structnamedA, you cannot also havetypedef struct my_struct { ... } my_structin the same declaration.