storage class specifier

This is a discussion on storage class specifier within the C Programming forums, part of the General Programming Boards category; I got the following error: Code: codegen.h:10: error: storage class specified for parameter ‚taNodeList‚ codegen.h:11: error: storage class specified for ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,338
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    probably - missing ; somewhere in the previous lines
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  4. #4
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Perhaps the macro TA_NODE supplies the extern already.
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  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 02: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, 06:18 AM
  5. Abstract class problem
    By VanJay011379 in forum C++ Programming
    Replies: 9
    Last Post: 07-31-2002, 01:30 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21