Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constraint handler trips on %Lf for printf_s #103

Closed
Th3T3chn0G1t opened this issue Nov 24, 2021 · 3 comments
Closed

Constraint handler trips on %Lf for printf_s #103

Th3T3chn0G1t opened this issue Nov 24, 2021 · 3 comments
Assignees
Labels

Comments

@Th3T3chn0G1t
Copy link

Th3T3chn0G1t commented Nov 24, 2021

Expected Behaviour: %Lf acts as a format specifier for long double

Actual Behaviour: A constraint handler is tripped

Example:
The following:

printf_s("%Lf\n", 0.0L);

Trips a constraint handler for printf_s: illegal %L format-specifier.

The same goes for all format specifiers allowing the L prefix - fF eE aA gG

I can work around not having long double but it does feel like this was just missed? It is a bit of a weird one in fairness.

It is listed on cppreference on the leftmost part of the printf-family format specifier table here: https://en.cppreference.com/w/c/io/fprintf but it's possible this is erroneous?

Thanks!

@Th3T3chn0G1t Th3T3chn0G1t changed the title Constraint handler trips on %Lf for printf_s Constraint handler trips on %Lf for printf_s Nov 24, 2021
@rurban rurban self-assigned this Nov 25, 2021
@rurban rurban added the bug label Nov 25, 2021
@rurban
Copy link
Owner

rurban commented Nov 25, 2021

Thanks. I forgot to test all the new cases. This is the new implementation, right?

@Th3T3chn0G1t
Copy link
Author

Its trunk so I presume so? I have this submoduled so I try to keep it at latest

@rurban
Copy link
Owner

rurban commented Nov 25, 2021

Good, that's what I thought. I have now a complete new printf Implementation, which misses a lot of test cases, and obviously many %L formats. I just added %Ls and %Lc, the others are also missing, as you found out.

rurban added a commit that referenced this issue Nov 26, 2021
%L with efg (precisions not yet checked)
LONG_DOUBLE
rurban added a commit that referenced this issue Nov 26, 2021
%L with efg (precisions not yet checked)
LONG_DOUBLE
@rurban rurban closed this as completed Jan 28, 2022
rurban added a commit that referenced this issue Feb 23, 2023
%L with efg (precisions not yet checked)
LONG_DOUBLE
rurban added a commit that referenced this issue Feb 23, 2023
%L with efg (precisions not yet checked)
LONG_DOUBLE
rurban added a commit that referenced this issue Feb 23, 2023
%L with efg (precisions not yet checked)
LONG_DOUBLE
rurban added a commit that referenced this issue Feb 23, 2023
%L with efg (precisions not yet checked)
LONG_DOUBLE
rurban added a commit that referenced this issue Mar 8, 2024
%L with efg (precisions not yet checked)
LONG_DOUBLE
rurban added a commit that referenced this issue Mar 8, 2024
%L with efg (precisions not yet checked)
LONG_DOUBLE
rurban added a commit that referenced this issue Dec 26, 2024
%L with efg (precisions not yet checked)
LONG_DOUBLE
@rurban rurban reopened this Dec 26, 2024
@rurban rurban added this to the 3.8.3 milestone Dec 26, 2024
rurban added a commit that referenced this issue Dec 26, 2024
%L with efg (precisions not yet checked)
LONG_DOUBLE
rurban added a commit that referenced this issue Dec 26, 2024
%L with efg (precisions not yet checked)
LONG_DOUBLE
@rurban rurban closed this as completed Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants