[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Warning message about string assignment
From: |
Stefanos |
Subject: |
[Tinycc-devel] Warning message about string assignment |
Date: |
Sun, 25 Apr 2021 03:08:44 +0300 |
I use `tcc version 0.9.27 - 1432574 (x86_64 Linux)` and the code I'm testing is:
#include <stdio.h>
#include <string.h>
int main(void)
{
char *s = "Hello, world!";
printf("String length is %zu characters long.\n", strlen(s));
}
I execute it with the following command:
tcc -Wall -std=c11 -o test_strlen test_strlen.c
The warning is
tmp.c:6: error: assignment discards qualifiers from pointer target type
With GCC and Clang does not throw any warning message.
The command I used for both is:
gcc -Wall -Wextra -Wpedantic -std=c11 -o test_strlen test_strlen.c
clang -Wall -Wextra -Wpedantic -std=c11 -o test_strlen test_strlen.c
- [Tinycc-devel] Warning message about string assignment,
Stefanos <=