<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/coan2/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/coan2/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/coan2/bugs/</id><updated>2025-09-08T15:31:14.454000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Malformed macro parameter list </title><link href="https://sourceforge.net/p/coan2/bugs/97/" rel="alternate"/><published>2025-09-08T15:31:14.454000Z</published><updated>2025-09-08T15:31:14.454000Z</updated><author><name>Michael Winestock</name><uri>https://sourceforge.net/u/mwinestock/</uri></author><id>https://sourceforge.net6f0be6c3605915eac848283d325be18c1863a6db</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have a case where in the source file:&lt;/p&gt;
&lt;h1 id="h-if-some_macro8-1"&gt;if !SOME_MACRO(8, 1)&lt;/h1&gt;
&lt;h1 id="h-endif"&gt;endif&lt;/h1&gt;
&lt;p&gt;When I attempt to execute:&lt;br/&gt;
coan.exe source - DSOME_MACRO(8,1)=1 file.c&lt;/p&gt;
&lt;p&gt;The tool reports:&lt;br/&gt;
coan.exe: while parsing options: error 0x00811: Malformed macro parameter list for symbol " SOME_MACRO "&lt;br/&gt;
coan.exe: while parsing options: progress 0x02101: Completed with errors, exit code 0x04&lt;/p&gt;
&lt;p&gt;When I attempt to execute:&lt;br/&gt;
coan.exe source - DSOME_MACRO=1 file.c&lt;/p&gt;
&lt;p&gt;The tool reports:&lt;br/&gt;
error 0x00812: "SOME_MACRO" takes 0 arguments; 2 provided&lt;br/&gt;
coan.exe: progress 0x02101: Completed with errors, exit code 0x04&lt;br/&gt;
coan.exe: info 0x02201: 1 out of 1 input files were reached; 0 files were not reached&lt;br/&gt;
coan.exe: info 0x02202: 0 out of 1 files reached were valid; 1 were abandoned due to parse errors&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>cannot compile with gcc8 on a pi.</title><link href="https://sourceforge.net/p/coan2/bugs/96/" rel="alternate"/><published>2023-07-25T14:24:24.962000Z</published><updated>2023-07-25T14:24:24.962000Z</updated><author><name>david collier</name><uri>https://sourceforge.net/u/myshkinuk/</uri></author><id>https://sourceforge.netc37032fa38a14df44a02b8831f1074f9768ae51b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;On a PI, using &lt;br/&gt;
    gcc (Raspbian 8.3.0-6+rpi1) 8.3.0&lt;br/&gt;
I cannot compile because of an error:&lt;br/&gt;
    citable.cpp:71:14: error: call to member function 'atoff' is ambiguous&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#95 configure.ac conaints a not C99 compliant check. </title><link href="https://sourceforge.net/p/coan2/bugs/95/?limit=25#32a2" rel="alternate"/><published>2022-12-18T07:14:18.004000Z</published><updated>2022-12-18T07:14:18.004000Z</updated><author><name>Pete Fordham</name><uri>https://sourceforge.net/u/pfordham1979/</uri></author><id>https://sourceforge.net12c4d684388902cededcb3025df9c691f85f157f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Bug opened as part of this effort:&lt;br/&gt;
&lt;a href="https://fedoraproject.org/wiki/Toolchain/PortingToModernC" rel="nofollow"&gt;https://fedoraproject.org/wiki/Toolchain/PortingToModernC&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>configure.ac conaints a not C99 compliant check. </title><link href="https://sourceforge.net/p/coan2/bugs/95/" rel="alternate"/><published>2022-12-18T07:07:15.905000Z</published><updated>2022-12-18T07:07:15.905000Z</updated><author><name>Pete Fordham</name><uri>https://sourceforge.net/u/pfordham1979/</uri></author><id>https://sourceforge.net154233827388a6d55ded5bb5996407a12213d02f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;configure.ac conaints a not C99 compliant check. It relies on implicit int return type and implicit function declaration of exit. Easily fixed with the attached patch.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#94 #if 0 does not evaluate to false</title><link href="https://sourceforge.net/p/coan2/bugs/94/?limit=25#7fe1" rel="alternate"/><published>2021-06-20T02:14:29.636000Z</published><updated>2021-06-20T02:14:29.636000Z</updated><author><name>David Muir Rolfe</name><uri>https://sourceforge.net/u/davemr/</uri></author><id>https://sourceforge.netfafe922123d88968f44d180c5750d46187240c73</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;h1 id="if-0"&gt;if 0&lt;/h1&gt;
&lt;p&gt;Remove this line&lt;/p&gt;
&lt;h1 id="endif"&gt;endif&lt;/h1&gt;&lt;/div&gt;</summary></entry><entry><title>#if 0 does not evaluate to false</title><link href="https://sourceforge.net/p/coan2/bugs/94/" rel="alternate"/><published>2021-06-20T02:13:13.287000Z</published><updated>2021-06-20T02:13:13.287000Z</updated><author><name>David Muir Rolfe</name><uri>https://sourceforge.net/u/davemr/</uri></author><id>https://sourceforge.net5614fc3ad24073c2e9771fb371a1b8b39a88a0f4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;h1 id="if-0-does-not-evaluate-to-false-and-so-the-lines-following-it-are-not-removed-it-is-not-possible-to-undefine-0"&gt;if 0 does not evaluate to false and so the lines following it are not removed. It is not possible to undefine '0'.&lt;/h1&gt;&lt;/div&gt;</summary></entry><entry><title>please migrate tests from python2 to python3</title><link href="https://sourceforge.net/p/coan2/bugs/93/" rel="alternate"/><published>2021-01-24T20:26:24.276000Z</published><updated>2021-01-24T20:26:24.276000Z</updated><author><name>Filipe Rosset</name><uri>https://sourceforge.net/u/rosset_filipe/</uri></author><id>https://sourceforge.net2091311f4771be9feec23a8cd16343551e21ffb2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;due python2 end-of-life, can you please migrate all tests from python2 to python3 style?&lt;br/&gt;
thanks!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#61 `spin` command broken on OS X</title><link href="https://sourceforge.net/p/coan2/bugs/61/?limit=25#1023" rel="alternate"/><published>2019-04-15T08:44:06.127000Z</published><updated>2019-04-15T08:44:06.127000Z</updated><author><name>Janani</name><uri>https://sourceforge.net/u/janani2024/</uri></author><id>https://sourceforge.nete6ed48fc59dce27663f20284e5e20205c79a514e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hi Mike,&lt;/p&gt;
&lt;p&gt;is this issue related to "can't create directory " followed by "The data is invalid"?&lt;br/&gt;
while using spin command.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#92 Out of bounds error in expression parser</title><link href="https://sourceforge.net/p/coan2/bugs/92/?limit=25#e2a5" rel="alternate"/><published>2018-09-19T15:30:21.171000Z</published><updated>2018-09-19T15:30:21.171000Z</updated><author><name>Filipe Rosset</name><uri>https://sourceforge.net/u/userid-2229128/</uri></author><id>https://sourceforge.net58fd5d513cf10261eff3b9a59b794f7e957e0365</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I can confirm this patch is working fine on Fedora. &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=1626440" rel="nofollow"&gt;https://bugzilla.redhat.com/show_bug.cgi?id=1626440&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;today, coan looks almost dead upstream, maybe it's time to migrate to github and try to engage more people to this project?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Out of bounds error in expression parser</title><link href="https://sourceforge.net/p/coan2/bugs/92/" rel="alternate"/><published>2018-08-27T13:52:02.109000Z</published><updated>2018-08-27T13:52:02.109000Z</updated><author><name>Nils Björklund</name><uri>https://sourceforge.net/u/nilbjo/</uri></author><id>https://sourceforge.net0b46ffd1d4a6d93ddda0a2f35ceb0d4cf003e3bd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; src/coan --version
coan, version 6.0.1 for 64 bit Unix/Linux(built Aug 27 2018,14:03:43)
coan: while parsing options: progress 0x02101: Completed, exit code 0x00
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;test0035.c fails on Fedora 28 because of an out of bounds error in the expression_parser. This error was discovered because Fedora 28 has added -D_GLIBCXX_ASSERTIONS flag (see &lt;a href="https://fedoraproject.org/wiki/Changes/HardeningFlags28" rel="nofollow"&gt;https://fedoraproject.org/wiki/Changes/HardeningFlags28&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Output from manually running the test case:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; src/coan source -DFOO1 -UFOO2 --verbose test_coan/test_cases/test0035.c
coan: progress 0x00105: Args: source -DFOO1 -UFOO2 --verbose test_coan/test_cases/test0035.c 
coan: progress 0x00102: Building input tree
coan: progress 0x00103: To do (1) "/home/nils/projekt/coan-6.0.1/test_coan/test_cases/test0035.c"
coan: progress 0x00104: 1 files to process
coan: progress 0x00101: Processing file (1) "/home/nils/projekt/coan-6.0.1/test_coan/test_cases/test0035.c"
/**ARGS: source -DFOO1 -UFOO2 */
/**SYSCODE: = 1 | 32 */
/usr/include/c++/8/bits/stl_vector.h:950: std::vector&amp;lt;_Tp, _Alloc&amp;gt;::const_reference std::vector&amp;lt;_Tp, _Alloc&amp;gt;::operator[](std::vector&amp;lt;_Tp, _Alloc&amp;gt;::size_type) const [with _Tp = expression_parser&amp;lt;parse_buffer&amp;gt;::deletion_code; _Alloc = std::allocator&amp;lt;expression_parser&amp;lt;parse_buffer&amp;gt;::deletion_code&amp;gt;; std::vector&amp;lt;_Tp, _Alloc&amp;gt;::const_reference = const expression_parser&amp;lt;parse_buffer&amp;gt;::deletion_code&amp;amp;; std::vector&amp;lt;_Tp, _Alloc&amp;gt;::size_type = long unsigned int]: Assertion '__builtin_expect(__n &amp;lt; this-&amp;gt;size(), true)' failed.
Aborted (core dumped)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Backtrace:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff70fa5c1 in __GI_abort () at abort.c:79
#2  0x0000000000405d83 in std::__replacement_assert (
    __file=0x4876e0 "/usr/include/c++/8/bits/stl_vector.h", __line=950, 
    __function=0x488560 &amp;lt;std::vector&amp;lt;expression_parser&amp;lt;parse_buffer&amp;gt;::deletion_code, std::allocator&amp;lt;expression_parser&amp;lt;parse_buffer&amp;gt;::deletion_code&amp;gt; &amp;gt;::operator[](unsigned long) const::__PRETTY_FUNCTION__&amp;gt; "std::vector&amp;lt;_Tp, _Alloc&amp;gt;::const_reference std::vector&amp;lt;_Tp, _Alloc&amp;gt;::operator[](std::vector&amp;lt;_Tp, _Alloc&amp;gt;::size_type) const [with _Tp = expression_parser&amp;lt;parse_buffer&amp;gt;::deletion_code; _Alloc = std::allo"..., __condition=0x4876b0 "__builtin_expect(__n &amp;lt; this-&amp;gt;size(), true)")
    at /usr/include/c++/8/x86_64-redhat-linux/bits/c++config.h:2389
#3  0x000000000042a971 in std::vector&amp;lt;expression_parser&amp;lt;parse_buffer&amp;gt;::deletion_code, std::allocator&amp;lt;expression_parser&amp;lt;parse_buffer&amp;gt;::deletion_code&amp;gt; &amp;gt;::operator[] (this=0x7fffffffc938, __n=39) at /usr/include/c++/8/bits/stl_vector.h:950
#4  0x00000000004295df in expression_parser&amp;lt;parse_buffer&amp;gt;::simplified[abi:cxx11]() const (this=0x7fffffffc8f0) at expression_parser.cpp:804
...
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The index i is outside the _deletions vector.&lt;/p&gt;
&lt;p&gt;The issue seems to be in the expression_parser::cut() member function. It sets _last_deletion to end, but end points one past the cut part. _last_deletion should be set to the index of rightmost cut character.&lt;/p&gt;
&lt;p&gt;Attaching patch which seems to fix the issue. make check passes after applying the patch.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>