Thread: storage class specifier

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    569

    storage class specifier

    I got the following error:

    Code:
    codegen.h:10: error: storage class specified for parameter âtaNodeListâ
    codegen.h:11: error: storage class specified for parameter âtaStringListâ
    codegen.h:12: error: storage class specified for parameter âtaFuncListâ
    codegen.h:22: error: storage class specified for parameter âdataStringGeneratedâ

    at the following code:
    Code:
    extern TA_NODE *taNodeList;
    extern TA_NODE *taStringList;
    extern TA_NODE *taFuncList;
    can you please tell me why?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Why does the error message say "parameter", when what you've posted clearly are not parameters?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    probably - missing ; somewhere in the previous lines
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  4. #4
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Perhaps the macro TA_NODE supplies the extern already.
    Mainframe assembler programmer by trade. C coder when I can.

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Quote Originally Posted by Salem View Post
    Why does the error message say "parameter", when what you've posted clearly are not parameters?
    maybe the op is using k&r style declarations? in which case it would still be incorrect, of course.
    Last edited by robwhit; 11-06-2008 at 03:50 PM.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by robwhit View Post
    maybe the op is using k&r style declarations? in which case it would still be incorrect, of course.
    Or, more likely, the compiler THINKS it's a K&R style declaration, when in fact it's just broken code.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Inherite nonvirtual class functionality
    By DrSnuggles in forum C++ Programming
    Replies: 2
    Last Post: 04-30-2009, 01:52 PM
  3. error: storage class specified for parameter
    By aim4sky in forum C Programming
    Replies: 20
    Last Post: 03-16-2009, 02:37 AM
  4. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM