public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: brian@talusmusic.com To: gcc-gnats@gcc.gnu.org Subject: c++/6774: printf("%lld") prints bad values Date: Wed, 22 May 2002 17:46:00 -0000 [thread overview] Message-ID: <20020523004113.9836.qmail@sources.redhat.com> (raw) >Number: 6774 >Category: c++ >Synopsis: printf("%lld") prints bad values >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed May 22 17:46:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Brian Ceccarelli >Release: g++ or g++3 >Organization: >Environment: Red Hat Linux on Intel Mandrake Linux on Intel >Description: # include <stdio.h> int main(int c, char *argv[]) { long long i; long long n; for (i=0LL; i<63LL; i++) { n = 1LL << i; printf("1 << %d = %lld\n", i, n); } return 0; } %lld is giving 64 bit results for i < 32 and 0 for i >= 32. >How-To-Repeat: Execute above program. >Fix: None that I can see. Is 64-bit integer formatting supported by g++ compilers? Doesn't seem so. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-05-23 0:46 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-05-22 17:46 brian [this message] 2002-05-22 23:42 rth 2002-05-23 5:46 Brian Ceccarelli 2002-05-23 7:56 Brian Ceccarelli 2002-05-23 9:26 Richard Henderson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020523004113.9836.qmail@sources.redhat.com \ --to=brian@talusmusic.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).