This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/71562] New: Changing the fix size of _S_local_capacity in sso_string_base.h


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71562

            Bug ID: 71562
           Summary: Changing the fix size of _S_local_capacity in
                    sso_string_base.h
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: development@faf-ltd.com
  Target Milestone: ---

Would it be possible to change the hard coded size <_S_local_capacity> in
<sso_string_base.h> in line #55 from 15 to a PREPROCESSOR_DEFINE which can be
provided to the compiler in the command line?

To catch the situation the PREPROCESSOR_DEFINE is not set, there have to be a
check in the beginning of the include file like this [the name is an example]:
#ifndef LOCAL_CAPACITY_STRING_BASE
  #define LOCAL_CAPACITY_STRING_BASE 15
#endif

and then line #55 would be this:
enum { _S_local_capacity = LOCAL_CAPACITY_STRING_BASE };

This would increase the flexibility for the programmer without a hack in the
c++ include file...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]