Bug 183462 - gcc does not print warnings properly under certain circumstances
gcc does not print warnings properly under certain circumstances
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
4
x86_64 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-01 06:01 EST by Vlado Potisk
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-01 07:23:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vlado Potisk 2006-03-01 06:01:39 EST
Gcc does not print warnings properly when invoked by the root user. The names of
functions and variables are wrong.

Normally I would not report this, but there might be a more serious problem with
incorrect memory references in a process running under the root UID behind it.

Version-Release number of selected component (if applicable):
gcc-4.0.2-8.fc4

How reproducible:
Always

Steps to Reproduce:
1. here is a (silly) C program called test.c
   int main(void) { int var; 0; }
2. as root run:
   gcc -Wall test.c
3. run the same command as non-root to see the difference

Actual results (root user gets this):
test.c: In function â:
test.c:1: warning: statement with no effect
test.c:1: warning: unused variable â
test.c:1: warning: control reaches end of non-void function

Expected results (non root users get this):
test.c: In function 'main':
test.c:1: warning: statement with no effect
test.c:1: warning: unused variable 'var'
test.c:1: warning: control reaches end of non-void function
Comment 1 Jakub Jelinek 2006-03-01 07:23:10 EST
That sounds like misconfigured terminal, you are running with some UTF-8 locale,
but your terminal isn't capable of printing UTF-8.
If you run GCC in C or some non-UTF-8 locale (such as
LC_ALL=C gcc
LANG=en_US gcc
etc.) then it will print '...' quotes.
Comment 2 Vlado Potisk 2006-03-01 09:36:40 EST
You are right about the UTF-8 locale. Thanks.

Note You need to log in before you can comment on or make changes to this bug.