https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100884
m farazma changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100884
--- Comment #1 from m farazma ---
The development team has mentioned this is correct behaviour, according to PPC
ABI the returning function needs to sign or zero extend the result when
necessary:
https://refspecs.linuxfoundation.org/ELF/ppc64/PP
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mfarazma.ext at gmail dot com
Target Milestone: ---
**0.c**
```
#include
uint32_t codegen();
int main(){
uint32_t expected = (codegen()) != 0 ? -1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100641
--- Comment #1 from m farazma ---
Issue seems to be similar to this older gcc bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59364
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mfarazma.ext at gmail dot com
Target Milestone: ---
Declaring a variable as "extern thread_local" in a C++ program leads to:
"ERROR: Undefined symbol: TLS init function
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mfarazma.ext at gmail dot com
Target Milestone: ---
Compiling this code:
```
constexpr int test(const int *arr) {
if(arr == 0){
//
}
return 5;
}
int main(){
static
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mfarazma.ext at gmail dot com
Target Milestone: ---
Compiling this code:
```
constexpr int test(const int *arr) {
if(arr == 0){
//
}
return 5;
}
int main(){
static
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97086
--- Comment #3 from m farazma ---
Sorry the above example needs to be changed to this in order to reproduce the
bug:
```
#include
#include
int main(){
float a = -0.0;
std::cout << nearbyintf(a) << std::endl;
return 0;
}
```
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97086
--- Comment #2 from m farazma ---
Wanted to point out the same happens when using "nearbyint":
```
#include
#include
int main(){
std::cout << nearbyintf(-0) << std::endl;
return 0;
}
```
expected: -0
actual: 0
https://en.cppreference.com/w/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266
--- Comment #6 from m farazma ---
(In reply to Jonathan Wakely from comment #5)
> Neither of those cases are constants, and the warning documentation (and the
> actual diagnostic itself) talk about constants.
>
> But there's still no warning for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266
--- Comment #4 from m farazma ---
(In reply to Jonathan Wakely from comment #3)
> No, the type is ValidateFlag. It has an underlying type of int8_t, but that
> just means it has the same size and range of values as int8_t. It's not
> actually tha
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266
--- Comment #2 from m farazma ---
(In reply to Jonathan Wakely from comment #1)
> (In reply to m farazma from comment #0)
> > ```
> > #include
> >
> > enum ValidateFlag : int8_t {
> >a = 0, b , c
> > };
> >
> > int main(){
> > bool t =
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mfarazma.ext at gmail dot com
Target Milestone: ---
```
#include
enum ValidateFlag : int8_t {
a = 0, b , c
};
int main(){
bool t = static_cast(c);
return sta
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mfarazma.ext at gmail dot com
Target Milestone: ---
Test program:
#include
#include
int main(){
float input = -0.1;
printf("%f\n",
14 matches
Mail list logo