Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007729OCamlruntime system and C interfacepublic2018-02-17 23:532018-09-28 12:43
Reporterab 
Assigned Tonojebar 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformallOSallOS Versionall
Product Version4.06.1 
Target VersionFixed in Version 
Summary0007729: caml/misc.h leaks reserved identifier
Descriptionclang -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 Reproduceclang -Wreserved-id-macro -x c /dev/null -S -include $(ocamlc -where)/caml/misc.h
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0018884)
dra (developer)
2018-02-18 00:45

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?
(0018886)
ab (reporter)
2018-02-18 11:34

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.
(0018887)
nojebar (developer)
2018-02-18 13:26

I think we should fix this. One is also liable to get a redefined macro warning if including <tchar.h> under Windows.
(0019391)
nojebar (developer)
2018-09-28 12:43

https://github.com/ocaml/ocaml/pull/2075 [^]

- Issue History
Date Modified Username Field Change
2018-02-17 23:53 ab New Issue
2018-02-18 00:45 dra Note Added: 0018884
2018-02-18 11:34 ab Note Added: 0018886
2018-02-18 13:26 nojebar Note Added: 0018887
2018-02-18 13:26 nojebar Status new => acknowledged
2018-09-28 12:43 nojebar Note Added: 0019391
2018-09-28 12:43 nojebar Assigned To => nojebar
2018-09-28 12:43 nojebar Status acknowledged => assigned


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker