473,396 Members | 2,014 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,396 software developers and data experts.

Compilation Issue.

Hi,

I am writing code for an Atmega645. I use the IAR compiler (v4.2).
I noticed that this piece of the code was not working. Meaning even if
the if condition evaluated to 0, it did not enter the loop. I am not
sure if I cleaned up all the project files before issuing a build (but
I think I did). But I know I issued a build several time and observed
this problem at all times.
{
if ( !GetMessageCount() )
{
..........do something....

return;
}

....do something else....
return.
}

However, when I changed it to this, it worked.

{
if ( GetMessageCount() == 0)
{
..........do something....

return;
}

....do something else....
return.
}

Further, when I changed it back again, it worked properly !!!

How can you explain that?

Btw, GetMessageCount is defined below.
unsigned char GetMessageCount()
{
return MessageCount;
}

Aug 7 '07 #1
3 1462
ka**********@gmail.com wrote:
>
Further, when I changed it back again, it worked properly !!!
It looks like you have an issue with your build process, rather than with C.

--
Ian Collins.
Aug 7 '07 #2
On Aug 7, 12:01 pm, Ian Collins <ian-n...@hotmail.comwrote:
karthik.n...@gmail.com wrote:
Further, when I changed it back again, it worked properly !!!

It looks like you have an issue with your build process, rather than with C.

--
Ian Collins.
Can you elaborate? What might be going wrong?

Aug 8 '07 #3
ka**********@gmail.com <ka**********@gmail.comwrote:
On Aug 7, 12:01 pm, Ian Collins <ian-n...@hotmail.comwrote:
karthik.n...@gmail.com wrote:
Further, when I changed it back again, it worked properly !!!
It looks like you have an issue with your build process, rather than with C.

--
Ian Collins.

Can you elaborate? What might be going wrong?
Anything, as long as you don't tell what do you do to build.

M.
Aug 10 '07 #4

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

Similar topics

1
by: Novice | last post by:
Hi all, I'm afraid this is the second posting of this information as I didn't get a response on the previous post. I will try to shorten my message (i.e. be more concise) in the hopes that it will...
11
by: Michael Gaab | last post by:
Compilation in c generally has four phases 1. Preprocessing 2. Compilation 3. Assembly 4. Linking. If I use a flag that will not link the code, order of compilation is not an issue,...
1
by: Wei | last post by:
Hello, How to turn on "batch compilation" of ASP.NET application ? Though by default I think the asp pipeline should compile in batch mode, yet I set <compilation defaultLanguage="vb"...
6
by: thomson | last post by:
Hi all, I have compiled by .net web applicaion in my local machine , and a dll has been created on the bin Directory, And i have copied the entire application using xcopy deployment to a...
5
by: Rob | last post by:
By default, the web.config file of an ASP.NET application contains the following debug attribute for the compilation element: <compilation debug="true"/> My question is this: When doing the...
2
by: A_StClaire_ | last post by:
another question. this one more just a curiosity. why does Visual Studio 2005 "support" manual compilation of source code files only through the inconvenient command line? I see and understand...
3
by: sam_cit | last post by:
Hi All, I have the following scenario, A class is declared in the header file and has a static member function sample() in sample.h sample.cc uses the static member function sample(). the...
35
by: mwelsh1118 | last post by:
Why doesn't C# allow incremental compilation like Java? Specifically, in Java I can compile single .java files in isolation. The resulting individual .class files can be grouped into .jar files....
5
by: Rahul | last post by:
Hi Everyone, I have the following files, file.h typedef struct { int data;
1
by: Roumen Petrov | last post by:
Hi list members, It seems to me that this is discussed many times in the past but without progress. As I understand in general there is no objections and preferred cross-compilation has to be...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.