This is the mail archive of the gcc-help@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]

Re: Sanity check - making a static initializer constant


On 10/10/2013 08:50 AM, Jonathan Wakely wrote:
> On 9 October 2013 20:10, Ian Pilcher wrote:
>> As far as I know, my options are:
>>
>> 1.  Live with the current scheme.
>>
>> 2.  Change "matches" in the function to an automatic variable.
>>
>> 3.  Change the "regex" member of "struct regex" to a pointer and
>>     create separate foo_regex, bar_regex, etc. objects.  I could then
>>     make the "regexes" array constant.
>>
>> Am I missing anything?
> 
> 4. Use C++ instead of C, which allows those initializers.
> 
> Probably not what you were looking for though.
> 

Yeah, I'll pass.  Full marks for creativity, though!

-- 
========================================================================
Ian Pilcher                                         arequipeno@gmail.com
Sometimes there's nothing left to do but crash and burn...or die trying.
========================================================================


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