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

  • Home
  • SEARCH
  • 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 8640991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:24:47+00:00 2026-06-12T11:24:47+00:00

I am getting g++ -O3 cache-l1-line.cpp -o cache-l1-line -lrt cache-l1-line.cpp: In function ‘int main()’:

  • 0

I am getting

g++ -O3 cache-l1-line.cpp -o cache-l1-line -lrt
cache-l1-line.cpp: In function 'int main()':
cache-l1-line.cpp:33:58: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat]

On my schools sunfire server … but not my my machine (Arch Linux). Why might that be. The line in question seems to be

printf("%d, %1.2f \n", i * sizeof(int), totalTime/TIMES);

Where i is defined:

for (int i = 4; i <= MAX_STRIDE/sizeof(int); i*=2)  {

Whats the problem: full source on GitHub (link to revision)

  • 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-12T11:24:49+00:00Added an answer on June 12, 2026 at 11:24 am

    In a 64-bit architecture expressions evaluate to 64-bit. Thus the proper specifier in that architecture would be %llu. Or conversely the expression should be casted to the width and type expected by the specifier %d.

    EDIT: %llu instead of %lld — thanks for comment.

    The expression (i * size_t) has different width and type in different architectures;
    it’s (unsigned int) apparently in your i3 -system and (unsigned long long) in your i7 -system.

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

Sidebar

Related Questions

I'm getting this warning Implicit conversion from enumeration type 'UIViewAnimationCurve' to different enumeration type
I'm getting the following warnings when trying to initiate a session: Warning: session_start() [function.session-start]:
I am using CakePHP and getting the following error Warning: Cache not configured properly.
WebClient.DownloadStringAsync does cache the server response. After once getting a response from the server
Getting red warning message that expected identifier for this statement CALayer = ImageView.layer; Using
I'm getting an EXC_BAD_ACCESS (or a malloc error) on the following line of code:
I'm getting this error [Not A Type release]: message sent to deallocated instance on
Why am I getting a permission error on the line were I copy the
I am getting an error in my view: Warning (512): SQL Error: 1054: Unknown
I'm trying to use __m128i as the value type of a cache-aligned vector 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.