[cfe-dev] request for help understanding a traceback

R P Herrold herrold at owlriver.com
Thu Feb 18 07:06:16 PST 2010


I see the following from a run report attachment
( full run report on another matter at:
 	http://llvm.org/bugs/show_bug.cgi?id=6344 )

[ side matter: ... I am not so sure about the 'deprecated' 
asserted -- standard reference so stating please?  but thanks 
for the fix ;) ]


/usr/bin/clang++ -Wall     -g -I/usr/include/mysql
 	-I/usr/include/c++/4.1.1/ -I/
 	usr/include/c++/4.1.1/x86_64-redhat-linux  -c -o obj/bind.o
 	src/bind.c
clang: warning: treating 'c' input as 'c++' when in C++ mode,
 	this behavior is deprecated
In file included from src/main.c:8:
In file included from src/main-h.h:11:
In file included from src/glossary.h:18:
In file included from src/../lib/glossary.h:46:
src/../lib/exceptions.h:23:1: warning: struct  'out_of_range'
 	was previously declared as a class  [-Wmismatched-tags]
struct out_of_range {
^~~~~~
class
In file included from src/main.c:8:
In file included from src/main-h.h:11:
In file included from src/glossary.h:18:
In file included from src/../lib/glossary.h:32:
src/../lib/type_names.h:19:47: note: previous use is here
                                         class out_of_range;
                                               ^

============================

I had understood these to be in separate namespaces, and no 
not 'previously used'

[herrold at centos-5 shim-100205-clang]$ for i in \
 	src/../lib/exceptions.h  src/../lib/type_names.h   ; do
 	echo ; echo $i ; echo "------------------" ;
 	grep -C 4 out_of_range $i ;
done


src/../lib/exceptions.h
------------------

namespace MinimalModeMultiParadigm {

#define OOR(Obj, Str)                                                   \
struct Obj : public out_of_range {                                      \
        Obj(int i) : out_of_range(i, Str) {}                             \
}

struct out_of_range {
        out_of_range(int i, char_0 s) : idx(i), msg(s) {}

        int    idx;
        char_0 msg;
};

OOR(nil_pointer_intern    , "refusing to intern non-string (null ptr)");
OOR(index_out_of_range    , "array index out of range");
OOR(invalid_graph_node    , "graph vertex is out of range");
OOR(matrix_indices_oor    , "matrix indices are invalid");
OOR(id_out_of_sequence    , "the sequence number is offset or out of order");
OOR(not_input_type_tag    , "input terminal token type is output/err");

src/../lib/type_names.h
------------------

namespace MinimalModeMultiParadigm {
                                         class Components;
                                         class MmmConstants;
                                         class out_of_range;
namespace SimpleEfficientAllocator {    class Memory;
                                         class MemConstants;
                                 typedef class MemConstants MemConst;
                                         class BootMemory;
[herrold at centos-5 shim-100205-clang]$

What am I not understanding?

-- Russ herrold



More information about the cfe-dev mailing list