473,395 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

gcc opteron define switch

Hello,

I would like to write a "C" program that is compatible in x32 and x64
Linux system under GCC environment.
Hence I need a a variable that is definite in x64 and indefinite in x32.
Certainly I can do in as -Dsomething, but I expect that compiler have
some own options.

Would you please to suggest me what kind of variable is definite in x64
and indefinite in x32?

Thank you

Ilgis

Nov 14 '05 #1
5 2102
Ilgis Ibragimov <il***@num.uni-sb.de> wrote:
I would like to write a "C" program that is compatible in x32 and x64
Linux system under GCC environment.
Hence I need a a variable that is definite in x64 and indefinite in x32.
Certainly I can do in as -Dsomething, but I expect that compiler have
some own options.


That's not a C question but something specific to your compiler.
I would recommend that you ask that in e.g. gnu.gcc.help where
it is not only on-topic but where you will find the people that
know most about these problems.
Regards, Jens
--
\ Jens Thoms Toerring ___ Je***********@physik.fu-berlin.de
\__________________________ http://www.toerring.de
Nov 14 '05 #2
Ilgis Ibragimov <il***@num.uni-sb.de> wrote in
news:41***************@num.uni-sb.de:
Hello,

I would like to write a "C" program that is compatible in x32 and x64
Linux system under GCC environment.


But a major point of C is to be platform neutral. There are no x86
switches in the C language. There is no assumed operating system or
compiler. Once you start specifying such things you need to seek an
newsgroup that discusses such things. comp.unix.programmer springs to mind
in this case.

--
- Mark ->
--
Nov 14 '05 #3
Ilgis Ibragimov wrote:

I would like to write a "C" program that is compatible in x32 and
x64 Linux system under GCC environment.
Hence I need a a variable that is definite in x64 and indefinite in x32.
Certainly I can do in as -Dsomething, but I expect that compiler have
some own options.

Would you please to suggest me what kind of variable is definite in x64
and indefinite in x32?


Exactly what you want is not clear - there is a language barrier.
However I expect you should find suitable values via the
definitions in <limits.h>.

--
"The most amazing achievement of the computer software industry
is its continuing cancellation of the steady and staggering
gains made by the computer hardware industry..." - Petroski
Nov 14 '05 #4
Hello,

thank everybody who answered to me. I found it in limits.h, there is
__WORDSIZE, and it is definite as 32 for x32, and 64 for x64.

Regards

Ilgis

Nov 14 '05 #5
Ilgis Ibragimov wrote:

thank everybody who answered to me. I found it in limits.h, there is
__WORDSIZE, and it is definite as 32 for x32, and 64 for x64.


That is a non-portable system value, which you should not use.
Use only the values that are defined in the standard. That
includes such things as INT_MAX and INT_MIN.

--
"Churchill and Bush can both be considered wartime leaders, just
as Secretariat and Mr Ed were both horses." - James Rhodes.
"A man who is right every time is not likely to do very much."
- Francis Crick, co-discover of DNA
Nov 14 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jacob nikom | last post by:
Hi, We ran MySQL (4.0.15-standard, 64-bit, SuSe 8.0) benchmarks on 2 CPU and 4 CPU Opteron machines. Mostly we tested insertion times with many simultaneous connections (hundreds). To our...
0
by: Plymouth Acclaim | last post by:
Hi guys, We have a problem with Dual AMD64 Opteron/MySQL 4.0.18/Mandrake 10 for a very high volume site. We are evaluating the performance on our new server AMD64 and it seems it's slow compared...
1
by: Rajrup Banerjee | last post by:
Hi, Does anybody know what are the changes to be done to compile C++ code which uses stl from SGI STL library, using g++ 3.2.3, on Linux running on AMD Opteron 64 bit? Regards, Rajrup.
1
by: louis_pastorik | last post by:
Does anyone have any information about 64 bit python support for Xeon and Opteron architectures on Windows platforms? If anyone has built the python runtime on either of these platforms before I...
1
by: Ericson Smith | last post by:
Hi, We're thinking of moving to a 64 bit platform for our database. Does anyone have any stories of migration from 32 bit to 64 bits? * How did it impact performance? * Were there any gochas?...
3
by: ashokrathi | last post by:
I am trying to compile SQL procedures on Linux running on AMD/Opteron 64-bit machine. I have 'gcc', 'cc' and 'g++' compilers on my machine. I have set DB2_SQLROUTINE_COMPILE_COMMAND with various...
54
by: Lionel Valero | last post by:
Hello, I have a test program that is compiled fine on a 32 bits redhat linux using gcc : *********************** main (argc, argv) int argc; char *argv; { int *ka; int nka;
1
by: Rocael Hernandez | last post by:
Hello all, I was wondering what's best for PG, since we have to decide what will be the new server for our DB, that will serve one or more websites. Our actual configuration is a dual xeon...
4
by: LLessieux | last post by:
Hi, I have been seeing a strange behaviour when doing some tests on a Dual - Dual Core Opteron system using Windows XP (32bits with SP2). In out application we have a wrapper around the thread...
4
by: venkat | last post by:
I have come across some preprossor statements, such as #define PPTR_int #define PPTR_str #define DDAR_baddr & #define DDAR_caddr & What do they mean, but when i compile the code with these...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.