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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:51:23+00:00 2026-06-18T01:51:23+00:00

I have a library that uses LLU as a suffix for a uint64 literal.

  • 0

I have a library that uses LLU as a suffix for a uint64 literal.

Visual studio 2010 (on windows7-64) complains about “bad suffix on number”, patching the library to use LL works.
Is there some preprocessor definition or properties check box I have to set to enable LLU ?

ps anybody know which is the correct behaviour? I have always assumed that whatever VC++ did was the opposite of the standard – but things have improved recently.

  • 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-06-18T01:51:24+00:00Added an answer on June 18, 2026 at 1:51 am

    Looking at the standards I have available to me (drafts only, but of reasonably recent versions), both C++ and C define both “ULL” and “LLU” as valid suffixes for an integer literal. This may be a recent change which VS2010 doesn’t follow, but I note that VS2012 does the exact same thing (i.e only ULL works).

    There is a difference between using a signed and unsigned literal, and that is MSVC’s behaviour when you right-shift a signed value. A signed literal will be sign-extended, but an unsigned literal will be padded with zero.

    In other words, the following contrived example:

    unsigned long long l2 = ~0LL >> 5;
    unsigned long long l3 = ~0ULL >> 5;
    

    …will produce two different values under MSVC.

    So if your library is expecting defined behaviour by stipulating unsigned values, then converting them to unsigned values will potentially result in undefined behaviour.

    In short, I think MSVC is being a bit naughty in only accepting one form of the suffix, but the best fix is to switch where the ‘U’ appears, and not to remove it entirely.

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

Sidebar

Related Questions

I have a visual studio 2005 c++ project (that uses QT framework). I would
I have a Perl library that uses many objects of some (about 3 or
Common scenario: I have a library that uses other libraries. For example, a math
Situation I have a client library that uses the Windows Azure AppFabric Service Bus
I have a monodroid application that uses a .net library that contains normal .resx
I have a static library (let's call it S) that uses a category (NSData+Base64
I have a program that uses pthread library to do the matrix multiplication of
I have a project that uses the Enterprise Library 4.1. When I target .net
I have a web application that uses a library which resides in TOMCAT_HOME/common/lib. This
I have an ASP.NET application that uses a custom .NET library (a .DLL file).

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.