Compiler Warning with -Wunreachable-code


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Compiler Warning with -Wunreachable-code
# 1  
Old 06-30-2010
Compiler Warning with -Wunreachable-code

Hi,

On compiling my code with flag -Wunreachable-code, I'm getting compiler warnings
../source/XmlFile.cpp:203: warning: will never be executed

Line 203 reads
throw XmlException("XmlFile::BLAH!!!");

This exception is thrown explicitly and obviously works !!

I'm using
$ gcc --version
gcc (GCC) 4.2.1

on debian Linux
$ uname -a
Linux H00001 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686 GNU/Linux

Compiler bug or am I just imagining things?

Regards
Ishdeep
 
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Programming

Incompatiblity of the code due to CC compiler version mismatch.

Incompatiblity of the code due to CC compiler version mismatch. I have a machine with Machine A-- Operating System:SunOs 5.8 Generic_117350-45 sun4u sparc SUNW,Ultra-80(solaris 5.8) CC Compiler:CC: WorkShop Compilers 4.2 16 Jun 1998 C++ 4.2 patch 104631-07 we have compiled C++... (36 Replies)
Discussion started by: Revathi R
36 Replies

2. Programming

How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries?

To make a programming language you need a compiler, so what was the first programming language and how was is created if you need the compiler first? The compiler itself is considered as a high language comparing to the machine! since the compiler is not created in 1's and 0's... Eventhough i... (12 Replies)
Discussion started by: f.ben.isaac
12 Replies

3. Programming

gcc compiler warning

The gcc compiler is giving following error in my code. Can Anyone help, why is this warning popping up. "void format, different type arg (arg 1)" The function's on which warning is given, looks like this: void fprint_stderr_sockarray(int* sockets) { .......... .......... } (2 Replies)
Discussion started by: Ahsan
2 Replies
Login or Register to Ask a Question
Module::Install::Compiler(3)				User Contributed Perl Documentation			      Module::Install::Compiler(3)

NAME
Module::Install::Compiler - Commands for interacting with the C compiler SYNOPSIS
To be completed DESCRIPTION
Many Perl modules that contains C and XS code have fiendishly complex Makefile.PL files, because ExtUtils::MakeMaker doesn't itself provide a huge amount of assistance and automation in this area. Module::Install::Compiler provides a number of commands that take care of common utility tasks, and try to take some of intricacy out of creating C and XS modules. COMMANDS
To be completed TO DO
The current implementation is relatively fragile and minimalistic. It only handles some very basic wrapper around ExtUtils::MakeMaker. It is currently undergoing extensive refactoring to provide a more generic compiler flag generation capability. This may take some time, and if anyone who maintains a Perl module that makes use of the compiler would like to help out, your assistance would be greatly appreciated. SEE ALSO
Module::Install, ExtUtils::MakeMaker AUTHORS
Refactored by Adam Kennedy <adamk@cpan.org> Mostly by Audrey Tang <autrijus@autrijus.org> Based on original works by Brian Ingerson <ingy@cpan.org> COPYRIGHT
Copyright 2002, 2003, 2004, 2006 by Adam Kennedy, Audrey Tang, Brian Ingerson. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.16.3 2012-03-01 Module::Install::Compiler(3)