Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 804061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:51:31+00:00 2026-05-14T23:51:31+00:00

GCC likes to tell me that I’m missing a specifier-qualifier-list in its error messages.

  • 0

GCC likes to tell me that I’m missing a specifier-qualifier-list in its error messages.

I know that this means I didn’t put in a correct type of something.

But what exactly is a specifier-qualifier-list?

Edit:

Example C code that causes this:

#include <stdio.h>

int main(int argc, char **argv) {
    struct { undefined_type *foo; } bar;
    printf("Hello, world!");
}

Gives these errors from GCC:

Lappy:code chpwn$ gcc test.c
test.c: In function ‘main’:
test.c:4: error: expected specifier-qualifier-list before ‘undefined_type’
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:51:32+00:00Added an answer on May 14, 2026 at 11:51 pm

    It’s a list of specifiers and qualifiers 🙂 Specifiers are things like void, char, struct Foo, etc., and qualifiers are keywords like const and volatile. See this C grammar for the definition.

    In your case, undefined_type was not defined yet, so the parser saw it as an identifier, not a specifier-qualifier-list like it expected. If you were to typedef ... undefined_type; before its occurrence, then undefined_type would become a specifier.

    If you think in terms of parsing C with a context-free grammar, the way the compiler handles typedefs and such may be bothersome. If I understand correctly, it games the parser generator by sneaking in symbol table operations so it can use context to parse the source code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've come across this strange error that I can't explain. Python 2.7.1+ (r271:86832, Apr
In gcc I can do compile-time warnings like this: #if !defined(_SOME_FEATURE_) #warning _SOME_FEATURE_ not
Recently I tried compiling program something like this with GCC: int f(int i){ if(i<0){
As far as I know, in gcc you can write something like: #define DBGPRINT(fmt...)
gcc 4.6.2 c89 I am just wondering if this is a good way to
This is only an issue on GCC versions prior to 4.4, this was fixed
Is there a way to tell gcc to throw a SIGFPE or something similar
There's probably a Google search that'll answer this question but for the life of
How do I tell if gcc (more specifically, g++) is optimizing tail recursion in
We are compiling an application that uses OpenMP. We are using gcc 4.4, with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.