Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939479 - app-editors/nano incorrect C syntax highlighting
Summary: app-editors/nano incorrect C syntax highlighting
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-11 19:41 UTC by stefan11111
Modified: 2024-09-11 20:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stefan11111 2024-09-11 19:41:09 UTC
When opening a .c file in nano, /* and */ get treated as comment markers, even in string literals.

For example, when opening this as a .c file:

char *x = "/*"; char *y = "*/";

#include <stdio.h>

int main()
{
    printf("%s %s\n", x, y);
}

The syntax highlighter treats everything between the /* and the */ as a comment,
even though this is incorrect.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-11 19:42:12 UTC
Please report it upstream.
Comment 2 stefan11111 2024-09-11 19:56:22 UTC
https://savannah.gnu.org/bugs/index.php?66205
Comment 3 Eli Schwartz gentoo-dev 2024-09-11 20:05:33 UTC
edit clash...