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
JANINOC(1)						      General Commands Manual							JANINOC(1)

NAME
Janino - a runtime Java Compiler. SYNOPSIS
janinoc [options] source-file ... DESCRIPTION
Janino is a compiler that reads a Java expression, block, class body, source file or a set of source files, and generates Java bytecode that is loaded and executed directly. Janino is not intended to be a development tool, but an embedded compiler for run-time compilation purposes, e.g. expression evaluators or "server pages" engines like JSP. janinoc is a front-end that compiles all specified input files. OPTIONS
-d output-dir Where to save class files -sourcepath dirlist, -extdirs dirlist, -bootclasspath dirlist Where to look for other source files -encoding encoding Encoding of source files, e.g. "UTF-8" or "ISO-8859-1" -verbose More output. -g [none|{lines,vars,source}] Generate all, no, or only some debugging info. -warn:pattern-list Issue certain warnings, examples: -warn:* All warnings -warn:IASF Only warn against implicit access to static fields -warn:*-IASF Enables all warnings, except those against implicit access to static fields -warn:*-IA*+IASF Enables all warnings, except those against implicit accesses, but do warn against implicit access to static fields -rebuild Compile all source files, even if the class files seems up-to-date -help Prints a help message AUTHORS
The Janino Team http://janino.net/ Arno Unkrig <aunkrig@codehaus.org> Janino July 2007 JANINOC(1)