I'm was not aware that *compile* buffer allows to differentiate between
warnings and errors. At least vhdl-mode never supported that.
I think the following ModelSim error regexp should match both formats:
("^\\(ERROR\\|WARNING\\|\\*\\* Error\\|\\*\\* Warning\\)[^:]*:\\(
*\[[0-9]+\]\\| ([^)]+)\\)? \\([^ \t\n]+\\)(\\([0-9]+\\)):" 3 4 nil)
Reto
On 29.03.2023 13:04, Eli Zaretskii wrote:
>> From: Cyril Arnould <cyril.arnould@outlook.com>
>> Date: Tue, 28 Mar 2023 19:43:40 +0000
>>
>> This bug is twofold. On one hand, the current configuration of the
>> ModelSim compiler is not able to parse and highlight the Warnings as
>> warnings when using vhdl-compile, they are listed as errors. With GHDL
>> on the other hand, the *compile* buffer differentiates between
>> warnings and errors when highlighting. I can't reproduce this at home
>> since I don't have a ModelSim license there, but you can see the effect
>> in a screenshot from the bugfix that introduced this:
>>
>>
https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-10/msg01377.html
>>
>> I have tried looking into modifying the regexp but for the life of me I
>> couldn't figure out how compile.el differentiates between warnings and
>> errors.
>>
>> Now the second problem is that I believe the way bug#5768 was fixed is
>> actually not compatible with ModelSim, but with ModelSim-Intel (formerly
>> Altera). As the link above shows, the warnings are formatted as follows:
>>
>> ** Warning: [3] counter_rtl.vhd(18): (vcom-1246) Range 5 downto 6 is null.
>>
>> My ModelSim actually formats its Warnings differently, for example:
>>
>> ** Warning: (vcom-1246) counter_rtl.vhd(18): Range 5 downto 6 is null.
>>
>> You can look into the ModelSim documentation under the "Message Format"
>> Section. I am not 100% certain if the number in brackets could also
>> appear in my Installation but possibly the number is just optional. The
>> regexp could be modified to allow both, this would avoid introducing a
>> separate Modelsim-Intel compiler.
>>
>> I can verify any fixes at work.
> As I'm not an expert on vhdl, I CC people who might help us with this
> issue.
>
> Thanks.