Bug 183462 - gcc does not print warnings properly under certain circumstances
Summary: gcc does not print warnings properly under certain circumstances
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 4
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-01 11:01 UTC by Vlado Potisk
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-01 12:23:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Vlado Potisk 2006-03-01 11:01:39 UTC
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 12:23:10 UTC
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 14:36:40 UTC
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.