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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:56:38+00:00 2026-05-27T02:56:38+00:00

I am using g++ version 4.1.2 on a RHEL 5.7 x86_64 box. This builds

  • 0

I am using g++ version 4.1.2 on a RHEL 5.7 x86_64 box. This builds just fine with g++ version 4.4.5 which comes with RHEL 6.0 x86_64. What does this compiler error mean and how do you fix it?

[mehoggan@hoggant35002 C]$ g++ -Wall -o binary ./binary.cpp 
./binary.cpp:2:5: error: invalid suffix "b11111111111111111111111111111111" on integer constant
./binary.cpp:3:5: error: invalid suffix "b11111111111111111111111111111110" on integer constant
./binary.cpp:4:5: error: invalid suffix "b11111111111111111111111111111100" on integer constant
./binary.cpp:5:5: error: invalid suffix "b11111111111111111111111111111000" on integer constant
./binary.cpp:6:5: error: invalid suffix "b11111111111111111111111111110000" on integer constant
./binary.cpp:7:5: error: invalid suffix "b11111111111111111111111111100000" on integer constant
./binary.cpp:8:5: error: invalid suffix "b11111111111111111111111111000000" on integer constant
./binary.cpp:9:5: error: invalid suffix "b11111111111111111111111110000000" on integer constant
./binary.cpp:10:5: error: invalid suffix "b11111111111111111111111100000000" on integer constant
./binary.cpp:11:5: error: invalid suffix "b11111111111111111111111000000000" on integer constant
./binary.cpp:12:5: error: invalid suffix "b11111111111111111111110000000000" on integer constant
./binary.cpp:13:5: error: invalid suffix "b11111111111111111111100000000000" on integer constant
./binary.cpp:14:5: error: invalid suffix "b11111111111111111111000000000000" on integer constant
./binary.cpp:15:5: error: invalid suffix "b11111111111111111110000000000000" on integer constant
./binary.cpp:16:5: error: invalid suffix "b11111111111111111100000000000000" on integer constant
./binary.cpp:17:5: error: invalid suffix "b11111111111111111000000000000000" on integer constant
./binary.cpp:18:5: error: invalid suffix "b11111111111111110000000000000000" on integer constant
./binary.cpp:19:5: error: invalid suffix "b11111111111111100000000000000000" on integer constant
./binary.cpp:20:5: error: invalid suffix "b11111111111111000000000000000000" on integer constant
./binary.cpp:21:5: error: invalid suffix "b11111111111110000000000000000000" on integer constant
./binary.cpp:22:5: error: invalid suffix "b11111111111100000000000000000000" on integer constant
./binary.cpp:23:5: error: invalid suffix "b11111111111000000000000000000000" on integer constant
./binary.cpp:24:5: error: invalid suffix "b11111111110000000000000000000000" on integer constant
./binary.cpp:25:5: error: invalid suffix "b11111111100000000000000000000000" on integer constant
./binary.cpp:26:5: error: invalid suffix "b11111111000000000000000000000000" on integer constant
./binary.cpp:27:5: error: invalid suffix "b11111110000000000000000000000000" on integer constant
./binary.cpp:28:5: error: invalid suffix "b11111100000000000000000000000000" on integer constant
./binary.cpp:29:5: error: invalid suffix "b11111000000000000000000000000000" on integer constant
./binary.cpp:30:5: error: invalid suffix "b11110000000000000000000000000000" on integer constant
./binary.cpp:31:5: error: invalid suffix "b11100000000000000000000000000000" on integer constant
./binary.cpp:32:5: error: invalid suffix "b11000000000000000000000000000000" on integer constant
./binary.cpp:33:5: error: invalid suffix "b10000000000000000000000000000000" on integer constant

The code:

static int s_bitCountMask[32] = {
    0b11111111111111111111111111111111,
    0b11111111111111111111111111111110,
    0b11111111111111111111111111111100,
    0b11111111111111111111111111111000,
    0b11111111111111111111111111110000,
    0b11111111111111111111111111100000,
    0b11111111111111111111111111000000,
    0b11111111111111111111111110000000,
    0b11111111111111111111111100000000,
    0b11111111111111111111111000000000,
    0b11111111111111111111110000000000,
    0b11111111111111111111100000000000,
    0b11111111111111111111000000000000,
    0b11111111111111111110000000000000,
    0b11111111111111111100000000000000,
    0b11111111111111111000000000000000,
    0b11111111111111110000000000000000,
    0b11111111111111100000000000000000,
    0b11111111111111000000000000000000,
    0b11111111111110000000000000000000,
    0b11111111111100000000000000000000,
    0b11111111111000000000000000000000,
    0b11111111110000000000000000000000,
    0b11111111100000000000000000000000,
    0b11111111000000000000000000000000,
    0b11111110000000000000000000000000,
    0b11111100000000000000000000000000,
    0b11111000000000000000000000000000,
    0b11110000000000000000000000000000,
    0b11100000000000000000000000000000,
    0b11000000000000000000000000000000,
    0b10000000000000000000000000000000,
};

#include <stdio.h>

int main(int argc, char *argv[])
{
    for (int i = 0; i < 32; i++) {
        printf("%d\n",s_bitCountMask[i]);
    }
}
  • 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-27T02:56:38+00:00Added an answer on May 27, 2026 at 2:56 am

    It means the older verison of g++ won’t accept the 0b000 binary constant syntax. You can rewrite the numbers as hex instead – binary easily translates into hex four bits at a time:

    0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8,
    0xfffffff0, 0xffffffe0, 0xffffffc0, 0xffffff80,
    0xffffff00, 0xfffffe00, 0xfffffc00, 0xfffff800,
    0xfffff000, 0xffffe000, 0xffffc000, 0xffff8000,
    0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000,
    0xfff00000, 0xffe00000, 0xffc00000, 0xff800000,
    0xff000000, 0xfe000000, 0xfc000000, 0xf8000000,
    0xf0000000, 0xe0000000, 0xc0000000, 0x80000000
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am on a RHEL 6.0 x86_64 box with the following version of libjpeg.
I am using version 1.4 and getting this error: The remote name could not
Using version v3.8 I got this behaviour with dragged markers. a) marker.setMap(map) --> Marker
I have set up a NInject (using version 1.5) binding like this: Bind<ISessionFactory>().ToMethod<ISessionFactory>(ctx =>
hope all is well. I am using Version 7.0. This morning I was struggling
Currently using MySQL version 5.1.6 This is my first real world build and so
I'm using version 2.0 of the FileHelpers library which is documented as being able
I am just starting out on Silverlight using version 2.0. I wanted to show
I am using version Galleria 1.2, which I know is a bit out of
Specifying the GLSL version gives a syntax error when using LWJGL. I haven't tried

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.