To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=61042
                  Issue #:|61042
                  Summary:|Don't use C++ only flag -ftemplate-depth-32 on
                          |c_locale.c
                Component:|utilities
                  Version:|680m149
                 Platform:|All
                      URL:|
               OS/Version:|Linux
                   Status:|UNCONFIRMED
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|PATCH
                 Priority:|P3
             Subcomponent:|code
              Assigned to:|hro
              Reported by:|gjin





------- Additional comments from [EMAIL PROTECTED] Mon Jan 23 01:24:26 -0800 
2006 -------
Option -ftemplate-depth-N is only for compiling C++ programs 
<http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html> 
Compiling C programs with option -ftemplate-depth-N will get warning on gcc-
4.0.2 and get error on icc-9.0 (Intel C/C++ Compiler):
> gcc -ftemplate-depth-32 helloworld.c
cc1: warning: command line option "-ftemplate-depth-32" is valid for 
C++/ObjC++ but not for C
> icc -ftemplate-depth-32 helloworld.c
Command-line error: pending instantiations option can be used only when 
compiling C++
compilation aborted for helloworld.c (code 4)

But in stlport module, -ftemplate-depth-32 is used as warning flag for C 
programs (e.g. c_locale.c) as well as C++ programs:
In gcc-3.0.mak, -ftemplate-depth-32 is defined in macro WARNING_FLAGS, which 
is included in CXXFLAGS_COMMON, and further CXXFLAGS_RELEASE_{static|dynamic}, 
which are used for compiling C programs in nmake_common.mak.

There may be multiple approaches to fix this. One simple solution is to get 
option -ftemplate-depth-32 out of WARNING_FLAGS (used for both C and CXX) and 
put it for CXX only, like below patch shows:

--- stlport/STLport-4.5.patch.ori
        2006-01-24 00:39:55.000000000 +0800
+++ stlport/STLport-4.5.patch
        2006-01-24 00:43:36.000000000 +0800
@@ -157,7 +157,7 @@
! # compiler
! # take these from the OOo build environment
! CC*= gcc 
-! CXX*= g++
+! CXX*= g++ -ftemplate-depth-32
! 
! #
! # Basename for libraries
@@ -184,7 +184,7 @@
! 
! include common_macros.mak
! 
-! WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -
ftemplate-depth-32
+! WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized
! 
! CXXFLAGS_COMMON =  -D_REENTRANT -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -
fexceptions -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
!

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to