LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-30-2005, 09:52 AM   #1
ecsed
Registered User
 
Registered: Jun 2005
Location: Graz/Austria
Distribution: RedHat Linux
Posts: 11

Rep: Reputation: 0
Question A Pre-Processor Bug???


Hy friends,

why do I get with Linux (gcc-Version 3.3.5 (Debian 1:3.3.5-8)):

#define CLOCAL 0004000
printf (" CLOCAL : O-%07o \n", CLOCAL);
printf (" 04000 : O-%07o \n", 04000);

two different outputs:

CLOCAL : O-0100000
04000 : O-0004000

Is the define statement really mis-interpreted as hex-value???

Thanks!
Regards
Egon
 
Old 06-30-2005, 10:18 AM   #2
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
Not the same with 4.0.0

I'm using gcc 4.0.0 with this code:
Code:
#include <stdio.h>
#define CLOCAL 0004000

int main(int argc, char** argv) {
    printf (" CLOCAL : O-%07o \n", CLOCAL);
    printf (" 04000 : O-%07o \n", 04000);
    return 0;
}
and I get this result:
Code:
 CLOCAL : O-0004000
 04000 : O-0004000
Looks like you could easily be looking at a bug there...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Linux on a dual processor machine (only one processor detected) rocordial Linux - Hardware 1 11-27-2004 02:16 AM
xinetd 100% utilization on one processor on a two processor system red hat 9 garnold Linux - General 0 02-02-2004 01:47 PM
Pre-processor to filter email on pop3 server prior to download tireseas Linux - General 1 09-20-2003 08:32 AM
FEA solver and pre-post processor tungsten Linux - Software 1 07-14-2003 06:45 AM
Kernel Panic on Dual Processor Motherboard with only 1 Processor olar Linux - Software 1 10-13-2001 03:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration