cannot use 'throw' with exceptions disabled

Hello everyone,
I tried to make a clang plugin to parse the source code. But when I parse
the file clang generate errors as following:
/opt/local/bin/mpicxx -E -C -I. -I../.. -g -O2 -o _tmp_0.cc chevt.cc
/Users/llvm/Release+Asserts/bin/clang -cc1 -load
../../xlate/clangit/libannotate.so -plugin minissf-annotate -I. -I../.. -g
-O2 -fexceptions _tmp_0.cc -o _tmp_1.x
In file included from chevt.cc:4:
In file included from ../../ssf.h:15:
In file included from ../../ssfapi/ssf_common.h:28:
In file included from /opt/local/include/mpich2/mpi.h:1197:
/opt/local/include/mpich2/mpicxx.h:184:91: error: cannot use 'throw' with
exceptions disabled
        {int err; err = MPI_Type_commit( (MPI_Datatype *) &the_real_datatype
) ; if (err) throw Exception(err);};
                                                                                         
^
/opt/local/include/mpich2/mpicxx.h:188:89: error: cannot use 'throw' with
exceptions disabled
        {int err; err = MPI_Type_free( (MPI_Datatype *) &the_real_datatype )
; if (err) throw Exception(err);};
                                                                                       
^
/opt/local/include/mpich2/mpicxx.h:193:140: error: cannot use 'throw' with
exceptions disabled
        {int err; err = MPI_Type_indexed( v1, (int *)v2, (int *)v3,
(MPI_Datatype) the_real_datatype, &(v5.the_real_datatype) ) ; if (err) throw
Exception(err);};
                                                                                                                                          
^
/opt/local/include/mpich2/mpicxx.h:199:121: error: cannot use 'throw' with
exceptions disabled
        {int err; err = MPI_Type_contiguous( v1, (MPI_Datatype)
the_real_datatype, &(v3.the_real_datatype) ) ; if (err) throw
Exception(err);};
                                                                                                                       
^
/opt/local/include/mpich2/mpicxx.h:205:125: error: cannot use 'throw' with
exceptions disabled
        {int err; err = MPI_Type_vector( v1, v2, v3, (MPI_Datatype)
the_real_datatype, &(v5.the_real_datatype) ) ; if (err) throw
Exception(err);};
                                                                                                                           
^
I tried both enable and disable exceptions(with -fexceptions) but the
results were the same. Anyone know how to fix this. Any suggestion is
appreciated, thanks.
Hao Jiang

Are you writing your own driver or something? If so, you need to pass -fcxx-exceptions to -cc1 to enable C++-specific exceptions behavior.

John.