help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

porting to 64 bit: compiler options


From: nprashanth
Subject: porting to 64 bit: compiler options
Date: 12 Jan 2007 15:05:48 -0800
User-agent: G2/1.0

Hi,

I've to port some code to a 64 bit platform (RedHat AS4). I was looking
for some compiler switches which can flag errors like this:

bash-3.00$ cat test.cpp
#include <string>

int main()
{
   //unsigned long int being assigned to an unsigned int
   unsigned xyz = std::string("").find("A");
}

I used some options, but they do not seem to flag the error:
bash-3.00$ g++ -c -Wconversion -Wimplicit -Wall -Wextra  -m64 test.cpp
test.cpp: In function `int main()':
test.cpp:7: warning: unused variable 'xyz'

version: gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)

Are there any options which can flag such errors? If no, is there any
way to find such errors?

Thanks for your time,
Prashanth.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]