On Mon, Nov 18, 2013 at 11:48:58AM -0800, Seth Arnold wrote:
> On Sat, Nov 16, 2013 at 11:59:03PM -0800, Steve Beattie wrote:
> > That said, I think continuing to support g++ 4.6 is important, given
> > it's the compiler version in Ubuntu 12.04 LTS (aka precise). So here
> > is a patch that converts the problematic array definition into a C++
> > unordered_map type. Using this depends on using the c++0x (aka c++11)
> > standard, and as we have gnuisms elsewhere (using the typeof builtin),
> > the patch also adds/converts to using -std=gnu++c0x in the build
> > rules (which conveniently eliminates some other warnings we had due
> > to other c++11-isms).
> 
> Very nice. I certainly don't mind using gnuisms, compiling on a platform
> where clang is the compiler of choice seems unlikely for many reasons.

Aww, shoot, that reminded me that I should try to look for errors with
scan-build (http://clang-analyzer.llvm.org/scan-build.html). Yes, as
expected, it fails due to the -std=gnu++0x option here.

> > -#define PDEBUG(fmt, args...) printf("Lexer (Line %d) (state %s): " fmt, 
> > current_lineno, state_names[YY_START], ## args)
> > +#define PDEBUG(fmt, args...) printf("Lexer (Line %d) (state %s): " fmt, 
> > current_lineno, state_names[YY_START].c_str(), ## args)
> 
> In time we should probably migrate these to:
> 
> cout << "Lexer (Line " << current_lineno << ") (state " << 
> state_names[YY_START] << "): << ...
> 
> But there's no need to hold up this patch now for that trasition.

Yep, there's a lot of work left to move the codebase over to more
stylistically pure C++.

-- 
Steve Beattie
<[email protected]>
http://NxNW.org/~steve/

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to