Bug 1366 - [LLVM] error: class 'sqlite3' was previously declared as a struct
[LLVM] error: class 'sqlite3' was previously declared as a struct
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: stats
ns-3-dev
All All
: P5 normal
Assigned To: Mitch Watrous
:
Depends on:
Blocks: 1345
  Show dependency treegraph
 
Reported: 2012-02-22 06:15 UTC by Gustavo J. A. M. Carneiro
Modified: 2012-03-12 11:46 UTC (History)
3 users (show)

See Also:


Attachments
Change class to struct patch (309 bytes, patch)
2012-03-09 08:59 UTC, Daniel Camara
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo J. A. M. Carneiro 2012-02-22 06:15:16 UTC
Compiling with clang++ 2.9 (LLVM):

In file included from ../src/stats/model/sqlite-data-output.cc:30:
../src/stats/model/sqlite-data-output.h:30:1: error: class 'sqlite3' was previously declared as a struct
      [-Werror,-Wmismatched-tags]
class sqlite3;
^~~~~
struct
In file included from ../src/stats/model/sqlite-data-output.cc:23:
/usr/include/sqlite3.h:227:16: note: previous use is here
typedef struct sqlite3 sqlite3;
               ^
1 error generated.

I think just changing "class sqlite3;" to "struct sqlite3;" makes it go away.
Comment 1 Daniel Camara 2012-03-09 08:59:24 UTC
Created attachment 1354 [details]
Change class to struct patch

To solve the "class 'sqlite3' was previously declared as a struct" LLVM error

 The patch simply changes the term "class"  to "struct"  The maintainer should evaluate if this is the best solution.
Comment 2 Daniel Camara 2012-03-12 11:46:42 UTC
Fixed changeset:   7762:61b2ef996f45