Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 7th, 2008, 02:35 PM
ashnin
Guest
 
Posts: n/a
Default Re: GCC 3.4.3 and GCC 4.1.2

On Jul 7, 6:10 pm, Michael DOUBEZ <michael.dou...@free.frwrote:
Quote:
ashnin a écrit :
>
Quote:
Please clarify my doubt.
>
I thought the answer you got earlier was clear enough.
>
>
>
Quote:
My source dir contains combination of C and C++ files
If I compile it using gcc 3.4.3 version, it works fine with some easy
warnings which I can clear.
>
Quote:
But if I compile it using gcc 4.1.2 it throws a warning for each .cpp
file I compile, which I could not clear
>
Quote:
"cc1plus: warning: command line option "-Wdeclaration-after-statement"
is valid for C/ObjC but not for C++"
>
Quote:
What is the difference between both the compilation? Why is it
throwing this warning when using gcc 4.1.2?
>
I guess that gcc 3.4.3 silently disabled this warning in the case of C++
file while 4.1.2 issues a warning.
>
Quote:
How to avoid this?
>
Remove -Wdeclaration-after-statement from the compilation option in your
build system for c++ files.
>
Quote:
Is this anything to do with the specs file?
>
I guess someone considered that declarations-mixed-with-execution is bad
style. If you are using Makefile, hunt for it with a good grep.
>
--
Michael


What is actually the Build system. I'm not clear, Coz I never included
that option(-Wdeclaration-after-statement) in my Makefile
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles