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 6742295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:49:35+00:00 2026-05-26T11:49:35+00:00

I am using Code::Blocks 10.05, and mingw. It seems the compiler does not recognized

  • 0

I am using Code::Blocks 10.05, and mingw. It seems the compiler does not recognized restrict qualifier and return “error: expected ‘;’, ‘,’ or ‘)’ before ‘src'”. Do I need to pass any compiler option in order to compile it correctly?

int inet_pton4 (const char *restrict src, unsigned char *restrict dst)

p/s: it seems mingw does not support inet_pton4, so i tried to integrate an open-source version into my code.

  • 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-26T11:49:36+00:00Added an answer on May 26, 2026 at 11:49 am

    If your compiler does not support the restrict keyword, just take that keyword out (a).

    It’s used to indicate to the compiler that you (the developer) promise that the pointers follow certain properties involving aliasing, and this, in turn, allows the compiler to perform certain optimisations that would otherwise not necessarily be safe.

    If you leave off that keyword in a compiler that supports it, it prevents those optimisations (slight downside).

    If you leave it off for compilers that don’t support that keyword, the downside is nil (since they don’t support those optimisations anyway) and the upside is considerable, as in “it will compile for you” 🙂


    (a) You may want to ensure you’re compiling in C99 mode first. While it may be true that you’re using an older gcc that doesn’t understand restrict, it’s equally possible that you’re not compiling in C99 mode, such as with -std=c99 (gcc docs seem to indicate that restrict has been supported even back to version 3.0).

    If, for some reason you cannot activate C99 mode, I think gcc has an extension that allows you to use __restrict.

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

Sidebar

Related Questions

I'm newly using CODE::BLOCKS+mingw compiler If I don't type return 0 at the end
I'm compiling using Code::Blocks on Windows 7 using the MinGW compiler (which I can
I'm making a Win32 GUI project using Code::Blocks and the MinGW compiler. At this
I have ported some code from Mingw which i wrote using code::blocks, to visual
I have been using the gcc compiler with code::blocks ide, and have noticed there
I've been using Code::Blocks with MinGW on a WinXP box for a while now.
Using Code::Blocks w/ mingw, and trying to use GLee for some OpenGL on windows.
I'm using Code::Blocks with MinGW to write my C++ applications in Windows XP. Now
im currently using the SDL-devel-1.2.13-mingw32 library in code blocks 8.02. with the mingw 5.1.6
I'm creating a Win32 GUI application using Code::Blocks and MinGW. I am using this

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.