Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87631 - gcc-3.4.3.20050110 invalid *printf return values
Summary: gcc-3.4.3.20050110 invalid *printf return values
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 72260 100172 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-01 22:11 UTC by Harald van Dijk (RETIRED)
Modified: 2005-10-31 20:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald van Dijk (RETIRED) gentoo-dev 2005-04-01 22:11:52 UTC
It's easiest to explain with an example:

% cat test.c 
#include<stdio.h> 
int main() { return printf("\n"); } 
% gcc test.c -o test ; ./test >/dev/null ; echo $? 
10 
% gcc test.c -o test -fno-builtin ; ./test >/dev/null ; echo $? 
1

There are few applications that rely on *printf's return value for such simple strings, but there is at least one in portage (xchat). It removed all server info except for the first for me, because it used fprintf's return value to check for errors and stopped writing the rest of the servers.

Reproducible: Always
Steps to Reproduce:




This seems to be caused by 08_all_gcc34-chk.patch.bz2. A manual installation of 
gcc 3.4.3 doesn't have this problem. It still didn't have this problem after I 
applied gcc-3.4.3-branch-update-20050110.patch.bz2. But when I applied that, I 
got the above results.

(I had to reinstall my system for other reasons after I first ran into this bug, 
so I can't give accurate emerge --info, but I asked on the forums and I'm not 
the only one with this problem, so I hope you can forgive me :) If you can't 
reproduce this, I'll install it again and give you my emerge --info after that.)
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2005-07-12 17:06:21 UTC
gcc 3.4.4 doesn't work correctly either. This bug has gone without any comment
for over three months. Please, would someone either remove that broken patch, or
fix it?
Comment 2 SpanKY gentoo-dev 2005-07-12 19:01:05 UTC
considering someone (lv i think, no idea really) just ripped it from fedora, i
dont mind punting it completely

it looks like the features it adds are cool, but if we cant maintain it, then no
point in keeping it ;)
Comment 3 SpanKY gentoo-dev 2005-07-12 19:29:42 UTC
punted patch from current ebuilds as well from our patch repo
Comment 4 SpanKY gentoo-dev 2005-08-26 21:29:50 UTC
*** Bug 100172 has been marked as a duplicate of this bug. ***
Comment 5 SpanKY gentoo-dev 2005-10-31 20:52:46 UTC
*** Bug 72260 has been marked as a duplicate of this bug. ***