Created attachment 14447 [details] [review] patch for proper use of USE_EXCEPTIONS When compiling poppler with the configure option "--enable-exceptions" and with gcc-4.2, it becomes obvious that the USE_EXCEPTIONS definition isn't used correctly. In goo/gmem.cc and goo/gmem.h, the definition is queried with "#if USE_EXCEPTIONS". Yet it is defined with "#define USE_EXCEPTIONS", which is boolean, and expands to an empty string. Therefore "#if USE_EXCEPTIONS" is an expression which cannot be evaluated. (The C preprocessor sees "#if ".) The solutions might be: - Replace "#if USE_EXCEPTIONS" with "#ifdef USE_EXCEPTIONS". - Replace "#define USE_EXCEPTIONS" with "#define USE_EXCEPTIONS 1". Since I suppose the latter isn't the regular case with autoconf, I propose the former solution. A patch is attached, which works for me. The patch is against poppler-0.6.2, but it applies cleanly and safely against newer versions, including 0.7.0.
Fixed it using making configure define USE_EXCEPTIONS to 1, it is a way smaller patch and we are following that convention anywhere else too.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.