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
caml/misc.h leaks reserved identifier #7729
Comments
Comment author: @dra27 The macro definition exists for compatibility with Windows NT's macro definition for Unicode string constants. Is this causing an actual problem, or "just" a standards warning? |
Comment author: ab It's enabled when using -Weverything (clang 5.0.1 at least). -Weverything enables few other diagnostics and caught real problems (unintended use of VLAs for instance) when used to build some of my code. |
Comment author: @nojb I think we should fix this. One is also liable to get a redefined macro warning if including <tchar.h> under Windows. |
Original bug ID: 7729
Reporter: ab
Assigned to: @nojb
Status: assigned (set by @nojb on 2018-09-28T10:43:30Z)
Resolution: open
Priority: normal
Severity: minor
Platform: all
OS: all
OS Version: all
Version: 4.06.1
Category: runtime system and C interface
Monitored by: @nojb
Bug description
clang -Wreserved-id-macro -x c /dev/null -S -include $(ocamlc -where)/caml/misc.h
In file included from :1:
/net/lib/ocaml/caml/misc.h:208:9: warning: macro name is a reserved identifier
[-Wreserved-id-macro]
#define _T(x) x
^
1 warning generated.
===
7.1.3 of ISO/IEC 9899:201x in part reads:
All identifiers that begin with an underscore and either an uppercase letter or another
underscore are always reserved for any use.
Steps to reproduce
clang -Wreserved-id-macro -x c /dev/null -S -include $(ocamlc -where)/caml/misc.h
The text was updated successfully, but these errors were encountered: