]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
* c-c++-common/Wtautological-compare-2.c: Remove unused line.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
05b28fd6
MP
12015-07-27 Marek Polacek <polacek@redhat.com>
2
3 PR c++/66555
4 PR c/54979
5 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6
451b5e48
MP
72015-07-20 Marek Polacek <polacek@redhat.com>
8
9 PR c++/55095
10 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
11 (build_binary_op): Warn about left shift overflows.
12
1916bcb5
AM
132015-07-09 Andrew MacLeod <amacleod@redhat.com>
14
15 * c-array-notation.c: Adjust includes for flags.h changes.
16 * c-objc-common.c: Likewise.
17
c7131fb2
AM
182015-07-07 Andrew MacLeod <amacleod@redhat.com>
19
20 * c-array-notation.c: Adjust includes.
21 * c-aux-info.c: Likewise.
22 * c-convert.c: Likewise.
23 * c-decl.c: Likewise.
24 * c-errors.c: Likewise.
25 * c-lang.c: Likewise.
26 * c-objc-common.c: Likewise.
27 * c-parser.c: Likewise.
28 * c-typeck.c: Likewise.
29
da2e71c9
MLI
302015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
31
32 PR fortran/66605
33 * c-decl.c (finish_function): Call do_warn_unused_parameter.
34
b155cfd9
MP
352015-06-29 Marek Polacek <polacek@redhat.com>
36
37 PR c/66322
38 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
39 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
40 about -Wswitch-bool here.
41 (do_case): Update c_add_case_label call.
42 (c_finish_case): Update c_do_switch_warnings call.
43
31521951
MP
442015-06-27 Marek Polacek <polacek@redhat.com>
45
46 * c-typeck.c: Use VECTOR_TYPE_P throughout.
47
22d03525
MP
482015-06-26 Marek Polacek <polacek@redhat.com>
49
50 * c-array-notation.c (fix_builtin_array_notation_fn): Use
51 INDIRECT_REF_P.
52 * c-typeck.c (array_to_pointer_conversion): Likewise.
53 (build_unary_op): Likewise.
54 (c_finish_return): Likewise.
55
f0889939
AM
562015-06-25 Andrew MacLeod <amacleod@redhat.com>
57
58 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
59 * c-parser.c: Likewise.
60
8d67ee55
RS
612015-06-25 Richard Sandiford <richard.sandiford@arm.com>
62
63 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
64 instead of pointer_hash.
65 (detect_field_duplicates): Likewise.
66
0ae9bd27
MP
672015-06-25 Marek Polacek <polacek@redhat.com>
68
69 * c-array-notation.c: Use VAR_P throughout.
70 * c-decl.c: Likewise.
71 * c-objc-common.c: Likewise.
72 * c-parser.c: Likewise.
73 * c-typeck.c: Likewise.
74
62f9079a
MP
752015-06-25 Marek Polacek <polacek@redhat.com>
76
77 * c-decl.c: Use is_global_var throughout.
78 * c-parser.c: Likewise.
79 * c-typeck.c: Likewise.
80
abb226c9
AM
812015-06-17 Andrew MacLeod <amacleod@redhat.com>
82
83 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
84 * c-aux-info.c: Likewise.
85 * c-convert.c: Likewise.
86 * c-decl.c: Likewise.
87 * c-errors.c: Likewise.
88 * c-lang.c: Likewise.
89 * c-objc-common.c: Likewise.
90 * c-parser.c: Likewise.
91 * c-typeck.c: Likewise.
92
8cbababc
JH
932015-06-11 Jan Hubicka <hubicka@ucw.cz>
94
95 PR middle-end/66325
96 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
97 variants.
98
a0349665
PMR
992015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
100
101 * c-decl.c (pop_scope): Register the main translation unit
102 through the new debug hook.
103
13fdf2e2
AM
1042015-06-08 Andrew MacLeod <amacleod@redhat.com>
105
106 * c-array-notation.c : Adjust include files.
107 * c-aux-info.c : Likewise.
108 * c-convert.c : Likewise.
109 * c-decl.c : Likewise.
110 * c-errors.c : Likewise.
111 * c-lang.c : Likewise.
112 * c-lang.h : Likewise.
113 * c-objc-common.c : Likewise.
114 * c-parser.c : Likewise.
115 * c-typeck.c : Likewise.
116
d7438551
AH
1172015-06-05 Aldy Hernandez <aldyh@redhat.com>
118
119 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
120 immediately clobber it.
121 (c_write_global_declarations_1): Remove call to
122 check_global_declaration_1.
123 (c_write_global_declarations_2): Remove.
124 (c_write_final_cleanups): Rename from c_write_global_declarations.
125 Remove call to finalize_compilation_unit.
126 Remove calls to debugging hooks.
127 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
128 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
129 * c-tree.h: Remove c_write_global_declarations.
130
ecb9f223
AM
1312015-06-04 Andrew MacLeod <amacleod@redhat.com>
132
133 * c-array-notation.c: Adjust includes for restructured coretypes.h.
134 * c-aux-info.c: Likewise.
135 * c-convert.c: Likewise.
136 * c-decl.c: Likewise.
137 * c-errors.c: Likewise.
138 * c-lang.c: Likewise.
139 * c-objc-common.c: Likewise.
140 * c-parser.c: Likewise.
141 * c-typeck.c: Likewise.
142
9482b620
MP
1432015-06-04 Marek Polacek <polacek@redhat.com>
144
145 PR c/66341
146 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
147 it is a lvalue.
148
bc51ace3
PK
1492015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
150
151 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
152 Warn for empty struct.
153 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
154
ea5b45b6
AT
1552015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
156
157 * c-decl.c (start_function): Call plugin before parsing.
158 (finish_function): Call plugin after parsing.
159
c2d47482
PK
1602015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
161
162 PR c/49551
163 * c-decl.c (merge_decls): Merge DECL_COMMON.
164
a95492ab
JW
1652015-05-22 Jim Wilson <jim.wilson@linaro.org>
166
167 * Make-lang.in (check_gcc_pallelize): Define.
168
fd5c817a
MP
1692015-05-22 Marek Polacek <polacek@redhat.com>
170
171 PR c/47043
172 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
173 attributes.
174
c7b70a3c
MP
1752015-05-21 Marek Polacek <polacek@redhat.com>
176
177 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
178 DECL_BUILT_IN.
179
21b634ae
MP
1802015-05-20 Marek Polacek <polacek@redhat.com>
181
182 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
183 * c-typeck.c: Likewise.
184
296a8c2f
MP
1852015-05-19 Marek Polacek <polacek@redhat.com>
186
187 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
188
41b37d5e
JJ
1892015-05-19 Jakub Jelinek <jakub@redhat.com>
190
191 PR middle-end/66199
192 * c-parser.c (c_parser_omp_for_loop): Don't add
193 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
194 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
195 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
196 constructs.
197
fab27f52
MM
1982015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
199
200 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 201 swaps.
fab27f52 202
40de31cf
MLI
2032015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
204
205 PR fortran/44054
206 * c-objc-common.c (c_tree_printer): Replace locus pointer with
207 accessor function.
208
3aa3c9fc
MP
2092015-05-14 Marek Polacek <polacek@redhat.com>
210
211 PR c/66066
212 PR c/66127
213 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
214 rather than with 0.
215
c3388e62
DM
2162015-05-12 David Malcolm <dmalcolm@redhat.com>
217
218 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
219 to add a call to warn_for_misleading_indentation.
220 (c_parser_else_body): Likewise, adding param "else_loc".
221 (c_parser_if_statement): Check for misleading indentation.
222 (c_parser_while_statement): Likewise.
223 (c_parser_for_statement): Likewise.
224
755e528f
MP
2252015-05-08 Marek Polacek <polacek@redhat.com>
226
227 PR c/64918
228 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
229 (output_init_element): Likewise.
230
0173bd2a
MP
2312015-05-07 Marek Polacek <polacek@redhat.com>
232
233 PR c/65179
234 * c-typeck.c (build_binary_op): Warn when left shifting a negative
235 value.
236
9babc352
MP
2372015-04-30 Marek Polacek <polacek@redhat.com>
238
239 * c-typeck.c (set_init_label): Call error_at instead of error and
240 pass LOC to it.
241
ac9f18db
MP
242 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
243 the type of a decl.
244
ec3fba51
MP
245 * c-typeck.c (c_build_va_arg): Clarify the error message.
246
b811915d
TS
2472015-04-29 Thomas Schwinge <thomas@codesourcery.com>
248
249 * c-parser.c (c_parser_oacc_enter_exit_data): Use
250 OMP_STANDALONE_CLAUSES.
251
f3075008
MP
2522015-04-28 Marek Polacek <polacek@redhat.com>
253
254 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
255
4e81b788
MP
2562015-04-28 Marek Polacek <polacek@redhat.com>
257
258 PR c/65901
259 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
260
6c1db78e
MP
2612015-04-25 Marek Polacek <polacek@redhat.com>
262
263 PR c/52085
264 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
265 attribute.
266
5c4abbb8
MP
2672015-04-23 Marek Polacek <polacek@redhat.com>
268
269 PR c/65345
270 * c-decl.c (set_labels_context_r): New function.
271 (store_parm_decls): Call it via walk_tree_without_duplicates.
272 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
273 instead of create_tmp_var. Build TARGET_EXPR instead of
274 COMPOUND_EXPR.
275 (build_atomic_assign): Use create_tmp_var_raw instead of
276 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
277
06aca1d5
IV
2782015-04-20 Ilya Verbin <ilya.verbin@intel.com>
279
280 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
281 (c_parser_omp_target_update): Add missed %> to error_at ().
282
8fba1830
BRF
2832015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
284
285 PR target/55143
286 * c-decl.c (c_default_pointer_mode): Remove definition.
287 * c-tree.h (c_default_pointer_mode): Remove declaration.
288
62021f64
TB
2892015-03-27 Tobias Burnus <burnus@net-b.de>
290
291 PR c/65586
292 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
293 error out.
294 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
295 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
296 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
297
9b65e171
JJ
2982015-03-19 Jakub Jelinek <jakub@redhat.com>
299
300 * c-decl.c (c_decl_attributes): Also add "omp declare target"
301 attribute for DECL_EXTERNAL VAR_DECLs.
302
17958621
JJ
3032015-03-11 Jakub Jelinek <jakub@redhat.com>
304
305 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
306 argument.
307
7ccb1a11
JJ
3082015-03-10 Jakub Jelinek <jakub@redhat.com>
309
310 PR c/65120
311 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
312 before preparing arguments to warn_logical_not_parentheses.
313
01177669
JJ
3142015-03-09 Jakub Jelinek <jakub@redhat.com>
315
316 PR c/65120
317 * c-typeck.c (parser_build_binary_op): Don't warn for
318 !!x == y or !b == y where b is _Bool.
319
802ac282
MP
3202015-03-09 Marek Polacek <polacek@redhat.com>
321
322 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
323 * c-decl.c (grokdeclarator): Likewise.
324 * c-typeck.c (build_binary_op): Likewise.
325
e5165b60
MP
3262015-02-27 Marek Polacek <polacek@redhat.com>
327
328 PR c/65228
329 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
330
065d214c
MP
3312015-02-14 Marek Polacek <polacek@redhat.com>
332
333 PR c/64768
334 * c-decl.c (grokdeclarator): Set the range of a flexible array member
335 declared through a typedef name.
336
e5d9235b
MP
3372015-02-13 Marek Polacek <polacek@redhat.com>
338
339 PR c/65050
340 * c-decl.c (grokdeclarator): Print also the type when giving
341 the error message about array's incomplete element type.
342
fa01ffcc
JJ
3432015-02-11 Jakub Jelinek <jakub@redhat.com>
344
345 PR c/64824
346 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
347 check in the POP macro.
348
c3e38a03
MP
3492015-02-09 Marek Polacek <polacek@redhat.com>
350
351 PR c/64856
352 * c-typeck.c (process_init_element): Don't always wrap
353 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
354 initializing a range of elements.
355
4886ec8e
JJ
3562015-02-04 Jakub Jelinek <jakub@redhat.com>
357
358 PR c/64824
359 PR c/64868
360 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
361
c3e38a03 3622015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
363
364 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
365 processing enum declaration.
366
7b33f0c8
MP
3672015-01-29 Marek Polacek <polacek@redhat.com>
368
369 PR c/64709
370 * c-typeck.c (pop_init_level): If constructor_elements has
371 exactly one element with integer_zerop value, set constructor_zeroinit
372 to 1. Remove braces around warning_init call.
373
dea63e49
JJ
3742015-01-27 Jakub Jelinek <jakub@redhat.com>
375
376 PR c/64766
377 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
378 of FUNCTION_DECLs with error_mark_node.
379
d38f7dce
JJ
3802015-01-26 Jakub Jelinek <jakub@redhat.com>
381
382 PR c/64778
383 * c-typeck.c (convert_arguments): Return -1 if there are
384 error_args, even if we've diagnosed too many arguments.
385
cbf5d0e7
RB
3862015-01-21 Richard Biener <rguenther@suse.de>
387
388 PR middle-end/64313
389 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
390 for builtins the user declared correctly.
391
41dbbb37
TS
3922015-01-15 Thomas Schwinge <thomas@codesourcery.com>
393 Bernd Schmidt <bernds@codesourcery.com>
394 Cesar Philippidis <cesar@codesourcery.com>
395 James Norris <jnorris@codesourcery.com>
396 Jakub Jelinek <jakub@redhat.com>
397 Ilmir Usmanov <i.usmanov@samsung.com>
398
399 * c-parser.c: Include "gomp-constants.h".
400 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
401 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
402 Use OMP_CLAUSE_SET_MAP_KIND.
403 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
404 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
405 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
406 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
407 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
408 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
409 "copyout", "create", "delete", "deviceptr", "gang", "host",
410 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
411 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
412 "present_or_create", "pcreate", "seq", "self", "vector",
413 "vector_length", "wait", "worker".
414 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
415 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
416 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
417 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
418 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
419 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
420 (c_parser_oacc_data_clause_deviceptr)
421 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
422 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
423 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
424 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
425 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
426 (c_parser_oacc_parallel, c_parser_oacc_update)
427 (c_parser_oacc_wait): New functions.
428 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
429 (c_finish_oacc_data): New prototypes.
430 * c-typeck.c: Include "gomp-constants.h".
431 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
432 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
433 OMP_CLAUSE_SET_MAP_KIND.
434 (c_finish_oacc_parallel, c_finish_oacc_kernels)
435 (c_finish_oacc_data): New functions.
436 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
437 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
438 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
439 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
440 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
441 GOMP_MAP_FORCE_DEVICEPTR.
442
adfac8df
JJ
4432015-01-09 Michael Collison <michael.collison@linaro.org>
444
445 * c-array-notation.c: Include hash-set.h, machmode.h,
446 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
447 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
448 * c-aux-info.c: Ditto.
449 * c-convert.c: Ditto.
450 * c-decl.c: Ditto.
451 * c-errors.c: Ditto.
452 * c-lang.c: Dittoxs.
453 * c-objc-common.c: Ditto.
454 * c-parser.c: Ditto.
455 * c-typeck.c: Include hash-set.h, machmode.h,
456 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
457 fold-const.h, wide-int.h, inchash.h, real.h and
458 fixed-value.h due to flattening of tree.h.
459
2cc901dc
MP
4602015-01-07 Marek Polacek <polacek@redhat.com>
461
462 PR c/64417
463 * c-typeck.c (process_init_element): Disallow initialization of
464 a flexible array member with a string constant if the structure
465 is in an array.
466
5624e564
JJ
4672015-01-05 Jakub Jelinek <jakub@redhat.com>
468
e5341100
JJ
469 PR sanitizer/64344
470 * c-typeck.c (convert_for_assignment, c_finish_return): For
471 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
472 types also set in_late_binary_op around convert call.
473 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
474 to integral type casts, if not in_late_binary_op, pass c_fully_fold
475 result on expr as last argument to ubsan_instrument_float_cast,
476 if in_late_binary_op, don't use c_save_expr but save_expr.
477
5624e564
JJ
478 Update copyright years.
479
5bd012f8
MP
4802015-01-05 Marek Polacek <polacek@redhat.com>
481
482 PR c/64423
483 * c-typeck.c (build_array_ref): Pass loc down to
484 warn_array_subscript_with_type_char.
485
768952be
MU
4862014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
487
488 * c-typeck.c: New behavious for pointers to arrays with qualifiers
489 (common-pointer-type): For pointers to arrays take qualifiers from
490 element type.
491 (build_conditional_expr): Add warnings for lost qualifiers.
492 (comp-target-types): Allow pointers to arrays with different qualifiers.
493 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
494 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
495 to PEDWARN_FOR_QUALIFIERS.
496
8f94a8c4
JJ
4972014-12-17 Jakub Jelinek <jakub@redhat.com>
498
499 PR sanitizer/64289
500 * c-convert.c: Include ubsan.h.
501 (convert): For real -> integral casts and
502 -fsanitize=float-cast-overflow don't call convert_to_integer, but
503 instead instrument the float cast directly.
504
b731b390
JJ
5052014-11-29 Jakub Jelinek <jakub@redhat.com>
506
507 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
508 c_finish_stmt_expr): Remove NULL last argument from
509 create_tmp_var_raw and create_tmp_var calls.
510 * c-array-notation.c (fix_builtin_array_notation_fn,
511 build_array_notation_expr, fix_conditional_array_notations_1,
512 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
513
541e35a6
MP
5142014-11-28 Marek Polacek <polacek@redhat.com>
515
516 PR c/63862
517 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
518 convert the right operand to integer type.
519
b286be94
MP
5202014-11-25 Marek Polacek <polacek@redhat.com>
521
522 PR c/63877
523 * c-decl.c (start_function): Disable -Wmissing-declarations warning
524 for inline functions.
525
aa7da51a
JJ
5262014-11-21 Jakub Jelinek <jakub@redhat.com>
527
528 PR target/63764
529 * c-typeck.c (build_array_ref): Adjust
530 convert_vector_to_pointer_for_subscript caller. If it returns true,
531 call non_lvalue_loc on the result.
532
d876207f
RB
5332014-11-11 Richard Biener <rguenther@suse.de>
534
535 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
536 to true.
537
e5e44252
AK
5382014-11-10 Andi Kleen <ak@linux.intel.com>
539
540 PR c/60804
541 * c-parser.c (c_parser_statement_after_labels): Call
542 check_no_cilk.
543 (c_parser_if_statement): Dito.
544 (c_parser_switch_statement): Dito.
545 (c_parser_while_statement): Dito.
546 (c_parser_do_statement): Dito.
547 (c_parser_for_statement): Dito.
548 * c-typeck.c (c_finish_loop): Dito.
549
13c21655
PC
5502014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
551
552 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
553 OPT_Wshift_count_overflow in the warnings.
554
2d51fcef
MP
5552014-10-30 Marek Polacek <polacek@redhat.com>
556
557 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
558 print the stripped version as well, if they're not the same.
559
ef4bddc2
RS
5602014-10-29 Richard Sandiford <richard.sandiford@arm.com>
561
562 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
563 machine_mode.
564
c582198b
AM
5652014-10-28 Andrew MacLeod <amacleod@redhat.com>
566
567 * c-decl.c: Adjust include files.
568 * c-parser.c: Ditto.
569
ddc8de03
PM
5702014-10-27 Phil Muldoon <pmuldoon@redhat.com>
571 Tom Tromey <tromey@redhat.com>
572
573 * c-tree.h (enum c_oracle_request): New.
574 (c_binding_oracle_function): New typedef.
575 (c_binding_oracle, c_pushtag, c_bind): Declare.
576 * c-decl.c (c_binding_oracle): New global.
577 (I_SYMBOL_CHECKED): New macro.
578 (i_symbol_binding): New function.
579 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
580 (I_TAG_CHECKED): New macro.
581 (i_tag_binding): New function.
582 (I_TAG_BINDING, I_TAG_DECL): Redefine.
583 (I_LABEL_CHECKED): New macro.
584 (i_label_binding): New function.
585 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
586 (c_print_identifier): Save and restore c_binding_oracle.
587 (c_pushtag, c_bind): New functions.
588
60393bbc
AM
5892014-10-27 Andrew MacLeod <amacleod@redhat.com>
590
591 * c-typeck.c: Adjust include files.
592
d723bb7c
MLI
5932014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
594
595 PR c++/53061
596 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
597 initialization here...
598 (c_initialize_diagnostics): ... but here. Set defaults after
599 building pretty-printer.
600
1bc5a451
MP
6012014-10-23 Marek Polacek <polacek@redhat.com>
602
603 PR c/63626
604 * c-decl.c (pop_scope): Don't print warning in external_scope.
605
4435bb92
MP
6062014-10-19 Marek Polacek <polacek@redhat.com>
607
608 PR c/63567
609 * c-typeck.c (output_init_element): Allow initializing objects with
610 static storage duration with compound literals even in C99 and add
611 pedwarn for it.
612
7278465e
MP
6132014-10-17 Marek Polacek <polacek@redhat.com>
614
615 PR c/63567
616 * c-typeck.c (digest_init): Allow initializing objects with static
617 storage duration with compound literals even in C99 and add pedwarn
618 for it.
619
d9b7be2e
MP
6202014-10-17 Marek Polacek <polacek@redhat.com>
621
622 PR c/63543
623 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
624 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
625 error multiple times. Print the type.
626
f406ae1f
MP
6272014-10-17 Marek Polacek <polacek@redhat.com>
628
629 PR c/63549
630 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
631 type.
632
92574c7c
MP
6332014-10-17 Marek Polacek <polacek@redhat.com>
634
635 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
636 (start_function): Use OPT_Wimplicit_int instead of 0.
637 (store_parm_decls_oldstyle): Likewise.
638
1bc4a978
MT
6392014-10-17 Alan Modra <amodra@gmail.com>
640
641 PR middle-end/61848
642 * c-decl.c (merge_decls): Don't merge section name or tls model
643 to newdecl symtab node, instead merge to olddecl. Override
644 existing olddecl section name. Set tls_model for all thread-local
645 vars, not just OMP thread-private ones. Remove incorrect comment.
646
83685514
AM
6472014-10-16 Andrew MacLeod <amacleod@redhat.com>
648
649 * c-decl.c: Adjust include files.
650
78a7c317
DD
6512014-10-14 DJ Delorie <dj@redhat.com>
652
653 * c-parser.c (c_parse_init): Add RID entries for each __intN.
654 (c_token_starts_typename): Check all __intN, not just __int128.
655 (c_token_starts_declspecs): Likewise.
656 (c_parser_declspecs): Likewise.
657 (c_parser_attribute_any_word): Likewise.
658 (c_parser_objc_selector): Likewise.
659 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
660 (struct c_declspecs): Add int_n_idx field to record *which* __intN
661 is specified.
662 * c-decl.c (declspecs_add_type): Check for all __intN, not just
663 __int128.
664 (finish_declspecs): Likewise.
665
74d98c1e
AB
6662014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
667
668 * c-parser.c (c_parser_all_labels): New function to replace
669 the duplicate code.
670 (c_parser_statement): Call the new function.
671
84937de2
MP
6722014-10-09 Marek Polacek <polacek@redhat.com>
673
674 PR c/63480
675 * c-typeck.c (pop_init_level): Don't warn about initializing
676 with { }.
677
0382aaa0
MP
6782014-10-07 Marek Polacek <polacek@redhat.com>
679
680 PR c/59717
681 * c-decl.c (header_for_builtin_fn): New function.
682 (implicitly_declare): Suggest which header to include.
683
7a0ca710
MP
6842014-10-07 Marek Polacek <polacek@redhat.com>
685
686 * c-convert.c (convert): Use error_operand_p.
687 * c-typeck.c (require_complete_type): Likewise.
688 (really_atomic_lvalue): Likewise.
689 (digest_init): Likewise.
690 (handle_omp_array_sections_1): Likewise.
691
6bc8a126
MP
6922014-10-03 Marek Polacek <polacek@redhat.com>
693
694 PR c/63453
695 * c-decl.c (pop_scope): Don't warn about "inline function declared
696 but never defined" for functions marked with gnu_inline attribute.
697
d90c0a59
JJ
6982014-09-25 Jakub Jelinek <jakub@redhat.com>
699
700 PR c++/63249
701 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
702 on low_bound and length.
703
083e891e
MP
7042014-09-24 Marek Polacek <polacek@redhat.com>
705
706 PR c/61405
707 PR c/53874
708 * c-parser.c: Don't define CPP_KEYWORD.
709 (c_parser_switch_statement): Pass original type to c_finish_case.
710 * c-tree.h (c_finish_case): Update declaration.
711 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
712 conditionally to c_do_switch_warnings.
713
8d95fe25
MP
7142014-09-03 Marek Polacek <polacek@redhat.com>
715
716 PR c/62024
717 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
718 conversions.
719
9a771876
JJ
7202014-09-02 Jakub Jelinek <jakub@redhat.com>
721 Balaji V. Iyer <balaji.v.iyer@intel.com>
722 Igor Zamyatin <igor.zamyatin@intel.com>
723
724 * c-parser.c (c_parser_cilk_for): New function.
725 (c_parser_cilk_grainsize): Likewise.
726 (c_get_temp_regvar): Likewise.
727 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
728 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
729 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
730 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
731 case.
732
b7679d96
CG
7332014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
734
735 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
736 with using HOST_WIDE_INT without truncation to 'int'
737
59ea0364
MP
7382014-08-22 Marek Polacek <polacek@redhat.com>
739
740 PR c++/62199
741 * c-typeck.c (parser_build_binary_op): Adjust call to
742 warn_logical_not_parentheses.
743
671a475e
IZ
7442014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
745
746 PR other/62008
747 * c-parser.c (c_parser_array_notation): Check for correct
748 type of an array added.
749
04159acf
MP
7502014-08-19 Marek Polacek <polacek@redhat.com>
751
752 PR c++/62153
753 * c-typeck.c (build_binary_op): If either operand of a comparison
754 is a boolean expression, call maybe_warn_bool_compare.
755
c77935ee
PP
7562014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
757
758 PR c/45584
759 * c-typeck.c (build_c_cast): Do a conversion even when the
760 TYPE_MAIN_VARIANTs are the same.
761
35aff4fb
MP
7622014-08-19 Marek Polacek <polacek@redhat.com>
763
764 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
765 pedwarn_c99 instead of pedwarn.
766 (grokfield): Likewise.
767 (warn_defaults_to): New function.
768 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
769 Unconditionally call pedwarn_c99 instead of pedwarn.
770 (start_function): Call warn_defaults_to instead of pedwarn_c99.
771 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
772 check flag_isoc11 before.
773 * c-errors.c (pedwarn_c99): Change the return type to bool.
774 Handle -Wc99-c11-compat.
775 * c-parser.c (disable_extension_diagnostics): Handle
776 warn_c99_c11_compat.
777 (restore_extension_diagnostics): Likewise.
778 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
779 instead of pedwarn, don't check flag_isoc11 before.
780 (c_parser_declspecs): Likewise.
781 (c_parser_alignas_specifier): Likewise.
782 (c_parser_alignof_expression): Likewise.
783 (c_parser_generic_selection): Likewise.
784 * c-tree.h (pedwarn_c99): Update declaration.
785 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
786 of pedwarn_c99.
787
177cce46
MP
7882014-08-19 Marek Polacek <polacek@redhat.com>
789
790 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
791 to pedwarn_c90.
792 * c-errors.c: Include "opts.h".
793 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
794 * c-parser.c (disable_extension_diagnostics): Handle negative value
795 of warn_c90_c99_compat, too.
796 (restore_extension_diagnostics): Likewise.
797 (c_parser_compound_statement_nostart): Pass
798 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
799
6dc99c33
MP
8002014-08-12 Marek Polacek <polacek@redhat.com>
801
802 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
803 Add pedwarn.
804 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
805 Likewise.
806 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
807
f3bede71
MP
8082014-08-10 Marek Polacek <polacek@redhat.com>
809
810 PR c/51849
811 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
812 Call pedwarn_c90 instead of pedwarn.
813 (check_bitfield_type_and_width): Likewise.
814 (declspecs_add_qual): Likewise.
815 (declspecs_add_type): Likewise.
816 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
817 Adjust to only call pedwarn_c90.
818 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
819 pedwarn_c90 instead of pedwarn.
820 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
821 * c-parser.c (disable_extension_diagnostics): Handle
822 warn_c90_c99_compat.
823 (restore_extension_diagnostics): Likewise.
824 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
825 pedwarn_c90 instead of pedwarn.
826 (c_parser_initelt): Likewise.
827 (c_parser_postfix_expression): Likewise.
828 (c_parser_postfix_expression_after_paren_type): Likewise.
829 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
830 * c-tree.h: Fix formatting.
831 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
832 pedwarn_c90 instead of pedwarn.
833
9f25a338
TS
8342014-08-07 Trevor Saunders <tsaunders@mozilla.com>
835
836 * c-typeck.c: Remove include of pointer-set.h.
837
044331a8
MP
8382014-08-07 Marek Polacek <polacek@redhat.com>
839
840 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
841
b787e7a2
TS
8422014-08-02 Trevor Saunders <tsaunders@mozilla.com>
843
844 * c-typeck.c: Use hash_map instead of pointer_map.
845
6e2830c3
TS
8462014-08-02 Trevor Saunders <tsaunders@mozilla.com>
847
848 * c-decl.c: Use hash_set instead of pointer_set.
849
a7ee52fb
IZ
8502014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
851
852 PR middle-end/61455
853 * c-array-notation.c (expand_array_notations): Handling
854 of DECL_EXPR added.
855
b4dfdc11
MG
8562014-07-31 Marc Glisse <marc.glisse@inria.fr>
857
858 PR c++/60517
859 * c-typeck.c (c_finish_return): Return 0 instead of the address of
860 a local variable.
861
976d5a22
TT
8622014-07-30 Tom Tromey <tromey@redhat.com>
863
864 * c-typeck.c (struct constructor_stack) <designator_depth>: New
865 field.
866 (really_start_incremental_init, push_init_level): Initialize
867 designator_depth.
868 (pop_init_level): Set global designator_depth.
869 (process_init_element): Check for designated_init attribute.
870
30281de2
MP
8712014-07-20 Marek Polacek <polacek@redhat.com>
872
873 PR c/61852
874 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
875 (implicitly_declare): Pass location to implicit_decl_warning.
876
b108f48f
JJ
8772014-07-14 Jakub Jelinek <jakub@redhat.com>
878
879 PR middle-end/61294
880 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
881 If non-NULL, call c_parser_check_literal_zero.
882 (c_parser_check_literal_zero): New function.
883 (c_parser_postfix_expression_after_primary): Adjust
884 c_parser_expr_list caller, handle -Wmemset-transposed-args.
885
773ec47f
MP
8862014-07-06 Marek Polacek <polacek@redhat.com>
887
888 PR c/6940
889 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
890 * c-tree.h (C_ARRAY_PARAMETER): Define.
891 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
892 function parameter.
893
22e1cf1c
JH
8942014-07-02 Jan Hubicka <hubicka@ucw.cz>
895 Chen Gang <gang.chen.5i5j@gmail.com>
896
897 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
898 releasing symbol.
899
52ec0ea3
MP
9002014-07-01 Marek Polacek <polacek@redhat.com>
901
902 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
903 instead of 0 to WARN_FOR_ASSIGNMENT.
904
d5c3d343
MP
9052014-07-01 Marek Polacek <polacek@redhat.com>
906
907 PR c/58286
908 * c-typeck.c (convert_for_assignment): Pass
909 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
910
6a7253a4
MP
9112014-06-30 Marek Polacek <polacek@redhat.com>
912
913 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
914 has no_sanitize_undefined attribute.
915
5e88a8f4
IZ
9162014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
917
918 PR middle-end/57541
919 * c-array-notation.c (fix_builtin_array_notation_fn):
920 Check for 0 arguments in builtin call. Check that bultin argument is
921 correct.
922 * c-parser.c (c_parser_array_notation): Check for incorrect initial
923 index.
924
9698b078
SH
9252014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
926
927 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
928 qualifiers in __auto_type for atomic types.
929 (c_parser_typeof_specifier): Discard all type qualifiers in
930 __typeof__ for atomic types.
931
6e07c515
MP
9322014-06-25 Marek Polacek <polacek@redhat.com>
933
934 PR c/61162
935 * c-parser.c (c_parser_statement_after_labels): Pass the location of
936 the return expression to c_finish_return.
937
da6f124d
JJ
9382014-06-25 Jakub Jelinek <jakub@redhat.com>
939
940 * c-typeck.c (c_finish_omp_clauses): Make sure
941 OMP_CLAUSE_LINEAR_STEP has correct type.
942
c203e8a7
TS
9432014-06-24 Trevor Saunders <tsaunders@mozilla.com>
944
945 * c-decl.c: Adjust.
946
56ad0e38
JJ
9472014-06-24 Jakub Jelinek <jakub@redhat.com>
948
949 * c-parser.c (c_parser_omp_for_loop): For
950 #pragma omp parallel for simd move lastprivate clause from parallel
951 to for rather than simd.
952
47c2554f
MP
9532014-06-23 Marek Polacek <polacek@redhat.com>
954
955 * c-typeck.c (parser_build_binary_op): Don't call
956 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
957
56363ffd
JH
9582014-06-15 Jan Hubicka <hubicka@ucw.cz>
959
960 * c-parser.c (c_parser_omp_threadprivate): Likewise.
961 * c-decl.c (merge_decls): Likewise.
962
d7ff7ae5
MP
9632014-06-09 Marek Polacek <polacek@redhat.com>
964
965 PR c/36446
966 * c-typeck.c (error_init): Call inform instead of error_at.
967 (pedwarn_init): Call inform instead of pedwarn.
968 (warning_init): Call inform instead of warning_at.
969
24d047a3
JH
9702014-06-07 Jan Hubicka <hubicka@ucw.cz>
971
972 * c-decl.c (merge_decls): Use set_decl_section_name.
973 (duplicate_decls): Remove node if it exists.
974
9bac5cbb
G
9752014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
976
977 PR c/53119
978 * c-typeck.c (push_init_level, process_init_element,
979 pop_init_level): Correct check for zero initialization, move
980 missing brace warning to respect zero initialization.
981
8ffcdea8
MP
9822014-06-05 Marek Polacek <polacek@redhat.com>
983
984 PR c/56724
985 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
986
742938c9
MP
9872014-06-05 Marek Polacek <polacek@redhat.com>
988
989 PR c/49706
990 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
991 on the left hand side operand of a comparison.
992
6447c55d
MP
9932014-06-05 Marek Polacek <polacek@redhat.com>
994
995 PR c/48062
996 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
997 Print note only if the warning was printed.
998
9dc7743c
IZ
9992014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1000
1001 PR c/58942
1002 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1003 with a pointer.
1004
fedfecef
MP
10052014-06-03 Marek Polacek <polacek@redhat.com>
1006
1007 PR c/60439
1008 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1009 c_start_case.
1010 * c-tree.h (c_start_case): Update.
1011 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1012 switch condition has boolean value.
1013
9b2b7279
AM
10142014-06-02 Andrew MacLeod <amacleod@redhat.com>
1015
1016 * c-decl.c: Include builtins.h.
1017 * c-parser.c: Likewise.
1018
5c1bc275
MP
10192014-05-27 Marek Polacek <polacek@redhat.com>
1020
1021 PR c/56724
1022 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1023 error and warning calls to error_at and warning_at. Pass location of
1024 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1025 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1026 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1027
97563bc8
IZ
10282014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1029
1030 PR c/61191
1031 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1032 function parameters.
1033
aede2c10
JH
10342014-05-23 Jan Hubicka <hubicka@ucw.cz>
1035
1036 * c-decl.c (merge_decls): Preserve symtab node pointers.
1037 (duplicate_decls): Free new decl.
1038
edbba2ce
TS
10392014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1040
f3316c6d
TS
1041 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1042 initialization.
1043
edbba2ce
TS
1044 * c-parser.c (c_parser_omp_target): Return bool values.
1045
68c81f24
TS
10462014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1047
1048 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1049 num_teams_loc variable to num_thread_limit_loc.
1050
632f2871
RS
10512014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1052
1053 * c-array-notation.c (expand_array_notations): Use void_node
1054 instead of void_zero_node.
1055
766090c2
TS
10562014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1057
1058 * c-decl.c (finish_struct): Adjust.
1059 (finish_enum): Likewise.
1060 (bind): Adjust.
1061 (record_inline_static): Likewise.
1062 (push_scope): Likewise.
1063 (make_label): Likewise.
1064 (lookup_label_for_goto): Likewise.
1065 (finish_struct): Likewise.
1066 (finish_enum): Likewise.
1067 (store_parm_decls): Likewise.
1068 (c_push_function_context): Likewise.
1069 * c-lang.h: Remove usage of variable_size gty attribute.
1070 * c-parser.c (c_parse_init): Adjust.
1071 (c_parse_file): Likewise.
1072
2b107f6b
MP
10732014-05-13 Marek Polacek <polacek@redhat.com>
1074
1075 PR c/61162
1076 * c-typeck.c (convert_for_assignment): Pass location to
1077 WARN_FOR_ASSIGNMENT instead of input_location.
1078
d033409e
MP
10792014-05-10 Marek Polacek <polacek@redhat.com>
1080
1081 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1082 maybe_warn_string_init.
1083 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1084 maybe_warn_string_init.
1085 * c-tree.h (maybe_warn_string_init): Update declaration.
1086 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1087 Call pedwarn_init with loc instead of with input_location.
1088 (digest_init): Pass init_loc to maybe_warn_string_init.
1089 (pop_init_level): Call pedwarn_init with loc instead of with
1090 input_location.
1091 (set_init_index): Likewise.
1092 (process_init_element): Likewise.
1093
ea58ef42
MP
10942014-05-09 Marek Polacek <polacek@redhat.com>
1095
1096 PR c/61096
1097 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1098 (c_parser_initelt): Pass location to set_init_label. Pass array index
1099 location to set_init_index.
1100 * c-tree.h (push_init_level): Update declaration.
1101 (pop_init_level): Likewise.
1102 (set_init_index): Likewise.
1103 (set_init_label): Likewise.
1104 * c-typeck.c (error_init): Add location parameter. Call error_at
1105 instead of error.
1106 (digest_init): Pass init_loc to error_init.
1107 (really_start_incremental_init):
1108 (push_init_level): Add location parameter. Pass loc to pop_init_level
1109 and error_init.
1110 (pop_init_level): Likewise.
1111 (set_designator): Add location parameter. Pass loc to pop_init_level,
1112 push_init_level, and error_init.
1113 (set_init_index): Add location parameter. Pass loc to error_init and
1114 set_designator.
1115 (set_init_label): Likewise.
1116 (output_init_element): Pass loc to error_init.
1117 (process_init_element): Pass loc to error_init, pop_init_level,
1118 pedwarn_init, and push_init_level.
1119
661a0813
MP
11202014-05-09 Marek Polacek <polacek@redhat.com>
1121
1122 PR c/50459
1123 * c-parser.c (c_parser_attributes): Parse the arguments as an
1124 expression-list if the attribute takes identifier.
1125
2793eeab
MP
11262014-05-08 Marek Polacek <polacek@redhat.com>
1127
1128 PR c/61053
1129 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1130 TYPE_ALIGN_UNIT.
1131
f827930a
MP
11322014-05-08 Marek Polacek <polacek@redhat.com>
1133
1134 PR c/61077
1135 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1136 of main.
1137
1d60af08
KZ
11382014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1139 Mike Stump <mikestump@comcast.net>
1140 Richard Sandiford <rdsandiford@googlemail.com>
1141
1142 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1143 (finish_enum): Use wide-int interfaces.
1144 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1145 * c-typeck.c (build_c_cast): Likewise.
1146 (set_nonincremental_init_from_string): Likewise.
1147 (c_tree_equal): Likewise.
1148
a0e24419
MP
11492014-05-02 Marek Polacek <polacek@redhat.com>
1150
1151 PR c/25801
1152 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1153 Return size_one_node when the type is not complete.
1154 (pointer_diff): Remove comment.
1155 (build_unary_op): Improve error messages.
1156
19fc9faa
MP
11572014-05-02 Marek Polacek <polacek@redhat.com>
1158
1159 * c-typeck.c (c_finish_return): Separate warning_at calls.
1160
63bc4e87
MP
11612014-05-02 Marek Polacek <polacek@redhat.com>
1162
1163 * c-tree.h (error_init): Remove declaration.
1164 (pedwarn_init): Likewise.
1165 * c-typeck.c (error_init): Make static and move above.
1166 (pedwarn_init): Likewise.
1167 (warning_init): Move above.
1168 (maybe_warn_string_init): Likewise.
1169
4bd2511b
JL
11702014-05-01 Jeff Law <law@redhat.com>
1171
1172 Revert:
1173
1174 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1175 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1176 avoid goto.
1177
6a358dcb
MP
11782014-05-02 Marek Polacek <polacek@redhat.com>
1179
1180 PR c/60784
1181 * c-typeck.c (push_init_level): Set constructor_designated to
1182 p->designated for structures.
1183
ae5ebda4
MP
11842014-05-01 Marek Polacek <polacek@redhat.com>
1185
1186 PR c/60915
1187 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1188 function-definition has an attribute after the declarator.
1189
96b40f8d
MP
11902014-05-01 Marek Polacek <polacek@redhat.com>
1191
1192 PR c/60257
1193 * c-typeck.c (warning_init): Add location_t parameter. Call
1194 warning_at instead of warning.
1195 (push_init_level): Pass input_location to warning_init.
1196 (add_pending_init): Add location_t parameter. Pass loc to
1197 warning_init.
1198 (set_nonincremental_init): Pass input_location to add_pending_init.
1199 (set_nonincremental_init_from_string): Likewise.
1200 (output_init_element): Pass loc to warning_init and to
1201 add_pending_init.
1202
32e00768
MP
12032014-05-01 Marek Polacek <polacek@redhat.com>
1204
1205 PR c/43395
1206 * c-typeck.c (c_finish_return): Distinguish between label and variable
1207 when warning about returning local address.
1208
c9379ce2
MP
12092014-05-01 Marek Polacek <polacek@redhat.com>
1210
1211 PR c/29467
1212 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1213 in C89 mode.
1214
d00887e8
MP
12152014-05-01 Marek Polacek <polacek@redhat.com>
1216
1217 PR c/43245
1218 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1219 instead of 0 to WARN_FOR_QUALIFIERS.
1220
5436fa2e
MP
12212014-05-01 Marek Polacek <polacek@redhat.com>
1222
1223 PR c/56989
1224 * c-typeck.c (default_conversion): Use better location for
1225 error call.
1226
f8ed5150
MP
12272014-04-30 Marek Polacek <polacek@redhat.com>
1228
1229 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1230 also when SANITIZE_FLOAT_DIVIDE is on.
1231
8337d1db
MP
12322014-04-30 Marek Polacek <polacek@redhat.com>
1233
1234 PR c/60139
1235 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1236 and pedwarn_init. Use loc insted of input_location.
1237
c4bdc42f
MP
12382014-04-30 Marek Polacek <polacek@redhat.com>
1239
1240 PR c/60351
1241 * c-typeck.c (build_binary_op): Use location when warning about
1242 shift count.
1243
45484dcf
MP
12442014-04-25 Marek Polacek <polacek@redhat.com>
1245
1246 PR c/18079
1247 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1248 always_inline/noinline and hot/cold attributes.
1249
34cf811f
MP
12502014-04-25 Marek Polacek <polacek@redhat.com>
1251
1252 PR c/60114
1253 * c-parser.c (c_parser_initelt): Pass input_location to
1254 process_init_element.
1255 (c_parser_initval): Pass loc to process_init_element.
1256 * c-tree.h (process_init_element): Adjust declaration.
1257 * c-typeck.c (push_init_level): Pass input_location to
1258 process_init_element.
1259 (pop_init_level): Likewise.
1260 (set_designator): Likewise.
1261 (output_init_element): Add location_t parameter. Pass loc to
1262 digest_init.
1263 (output_pending_init_elements): Pass input_location to
1264 output_init_element.
1265 (process_init_element): Add location_t parameter. Pass loc to
1266 output_init_element.
1267
42056eac
JJ
12682014-04-24 Jakub Jelinek <jakub@redhat.com>
1269
1270 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1271 atomic-clause, allow comma in between atomic-clause and
1272 seq_cst.
1273
e162a134
JJ
12742014-04-22 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR c/59073
1277 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1278 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1279
2f6babac
IZ
12802014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1281
1282 PR middle-end/60469
1283 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1284 create_tmp_var instead build_decl for creating temps.
1285 (build_array_notation_expr): Likewise.
1286 (fix_conditional_array_notations_1): Likewise.
1287 (fix_array_notation_expr): Likewise.
1288 (fix_array_notation_call_expr): Likewise.
1289
8edbfaa6
JJ
12902014-03-28 Jakub Jelinek <jakub@redhat.com>
1291
1292 PR c++/60689
1293 * c-tree.h (c_build_function_call_vec): New prototype.
1294 * c-typeck.c (build_function_call_vec): Don't call
1295 resolve_overloaded_builtin here.
1296 (c_build_function_call_vec): New wrapper function around
1297 build_function_call_vec. Call resolve_overloaded_builtin here.
1298 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1299 Call c_build_function_call_vec instead of build_function_call_vec.
1300 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1301 * c-decl.c (finish_decl): Likewise.
1302
7485aeea
MLI
13032014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1304
1305 PR c/55383
1306 * c-typeck.c: Use correct format string in cast-qual warning
1307
b17a8b07
TS
13082014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1309
1310 * c-decl.c (c_decl_attributes): Use
1311 lang_hooks.types.omp_mappable_type.
1312 * c-typeck.c (c_finish_omp_clauses): Likewise.
1313
3af9c5e9
MP
13142014-03-06 Marek Polacek <polacek@redhat.com>
1315
1316 PR c/60197
1317 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1318 of checking tree code.
1319
1c9f5f33
PK
13202014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1321
1322 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1323 (c_parser_parameter_declaration): Likewise.
1324
cc28fc7f
MP
13252014-02-19 Marek Polacek <polacek@redhat.com>
1326
1327 PR c/60195
1328 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1329 Call mark_exp_read on exp.value.
1330 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1331 TREE_ADDRESSABLE on old instead of val.
1332 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1333
b581c05c
PK
13342014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1335
1336 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1337 C_EXPR_APPEND by vec_safe_push.
1338 * c-tree.h (C_EXPR_APPEND): Remove.
1339
81e5eca8
MP
13402014-01-31 Marek Polacek <polacek@redhat.com>
1341
1342 PR c/59963
1343 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1344 build_function_call_vec.
1345 (build_function_call): Likewise.
1346 (build_atomic_assign): Likewise.
1347 (build_function_call_vec): Add arg_loc parameter. Use it.
1348 (convert_arguments): Likewise.
1349 (convert_for_assignment): Rename rhs_loc to expr_loc.
1350 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1351 (c_parser_objc_keywordexpr): Likewise.
1352 (c_parser_postfix_expression_after_primary): Call
1353 build_function_call_vec with expr_loc rather than op_loc.
1354 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1355 build_function_call_vec.
1356 (c_parser_expr_list): Add locations parameter. Fill it with locations
1357 of function arguments.
1358 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1359
68fca595
MP
13602014-01-30 Marek Polacek <polacek@redhat.com>
1361
1362 PR c/59940
1363 * c-typeck.c (build_function_call_vec): Use loc parameter.
1364 (convert_arguments): Add location parameter. Use it.
1365 (ep_convert_and_check): Likewise.
1366 (build_atomic_assign): Adjust convert_for_assignment call.
1367 (build_modify_expr): Likewise.
1368 (digest_init): Likewise.
1369 (c_finish_return): Likewise.
1370 (build_conditional_expr): Adjust ep_convert_and_check calls.
1371 (convert_for_assignment): Add rhs_loc parameter. Use it.
1372 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1373 calls.
1374
fa337f3a
RB
13752014-01-30 Richard Biener <rguenther@suse.de>
1376
1377 PR c/59905
1378 * c-typeck.c (build_function_call_vec): Do not replace calls
1379 to a function via an incompatible type with a runtime abort.
1380
b72271b9
BI
13812014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1382
1383 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1384 flag_enable_cilkplus with flag_cilkplus.
1385 (c_parser_direct_declarator_inner): Likewise.
1386 (c_parser_attribute_any_word): Likewise.
1387 (c_parser_attributes): Likewise.
1388 (c_parser_compound_statement): Likewise.
1389 (c_parser_statement_after_labels): Likewise.
1390 (c_parser_if_statement): Likewise.
1391 (c_parser_switch_statement): Likewise.
1392 (c_parser_do_statement): Likewise.
1393 (c_parser_for_statement): Likewise.
1394 (c_parser_unary_expression): Likewise.
1395 (c_parser_postfix_expression): Likewise.
1396 (c_parser_postfix_expression_after_primary): Likewise.
1397 (c_parser_postfix_expression_after_primary): Likewise.
1398 (c_parser_omp_clause_name): Likewise.
1399 (c_finish_omp_declare_simd): Likewise.
1400 (c_parser_cilk_verify_simd): Likewise.
1401 * c-typeck.c (build_array_ref): Likewise.
1402 (build_function_call_vec): Likewise.
1403 (convert_arguments): Likewise.
1404 (build_compound_expr): Likewise.
1405 (c_finish_return): Likewise.
1406 (c_finish_if_stmt): Likewise.
1407 (c_finish_loop): Likewise.
1408 (build_binary_op): Likewise.
1409
393e8e8b
MP
14102014-01-23 Marek Polacek <polacek@redhat.com>
1411
1412 PR c/59846
1413 * c-typeck.c (parser_build_binary_op): Use location instead of
1414 input_location.
1415 (build_binary_op): Pass location to shorten_compare.
1416
f04dda30
MP
14172014-01-23 Marek Polacek <polacek@redhat.com>
1418
1419 PR c/58346
1420 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1421 an empty aggregate.
1422
789eadcd
MP
14232014-01-23 Marek Polacek <polacek@redhat.com>
1424
1425 PR c/59871
1426 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1427 of a comma expression.
1428 (emit_side_effect_warnings): Likewise.
1429
40f14e9f
BI
14302014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1431
1432 PR c/59825
1433 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1434 function to use walk_tree and moved a lot of its functionality to
1435 expand_array_notations.
1436 (expand_array_notations): New function.
1437
74558dd9
BI
14382014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1439
1440 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1441 attribute an attribute without value.
1442
652fea39
JJ
14432014-01-23 Jakub Jelinek <jakub@redhat.com>
1444
1445 PR middle-end/58809
1446 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1447 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1448
f34f1c87
MP
14492014-01-22 Marek Polacek <polacek@redhat.com>
1450
1451 PR c/59891
1452 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1453 of remove_c_maybe_const_expr on op1 and op2.
1454
241f845a
JJ
14552014-01-15 Jakub Jelinek <jakub@redhat.com>
1456
1457 PR c/58943
1458 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1459 effects, preevaluate rhs using SAVE_EXPR first.
1460
9a74f20c
BI
14612014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1462
1463 PR c++/59631
1464 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1465 statements with if-elseif statements.
1466
96066ce1
MP
14672014-01-06 Marek Polacek <polacek@redhat.com>
1468
1469 PR c/57773
1470 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1471 defined bit-field types only in ISO C.
1472
23a5b65a
RS
14732014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1474
1475 Update copyright years
1476
f9030485
RS
14772014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1478
1479 * c-array-notation.c: Use the standard form for the copyright notice.
1480
41958c28
BI
14812013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1482
1483 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1484 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1485 field in parser is not empty. If not-empty, call the function
1486 c_parser_finish_omp_declare_simd.
1487 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1488 between SIMD-enabled functions and #pragma simd. Added new parameter.
1489 (c_parser_cilk_all_clauses): Modified the usage of the function
1490 c_parser_cilk_clause_vectorlength as mentioned above.
1491 (c_parser_cilk_simd_fn_vector_attrs): New function.
1492 (c_finish_cilk_simd_fn_tokens): Likewise.
1493 (is_cilkplus_vector_p): Likewise.
1494 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1495 "nomask," and "mask" strings in clause name.
1496 (c_parser_omp_all_clauses): Added 3 new case statements:
1497 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1498 PRAGMA_CILK_CLAUSE_NOMASK.
1499 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1500 check for vector attribute and if so call the function
1501 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1502 called the function c_finish_cilk_simd_fn_tokens.
1503 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1504 parser field is non-empty. If so, parse them as you would parse
1505 the omp declare simd pragma.
1506 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1507 Added a check when step is a parameter and flag it as error.
1508 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1509 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1510 pragma_omp_clause.
1511
cef0fd0e
TS
15122013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1513
1514 * c-parser.c (c_parser_omp_parallel): Fix description.
1515
12893402
BI
15162013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1517
1518 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1519 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1520 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1521 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1522
296674db
JM
15232013-12-04 Joseph Myers <joseph@codesourcery.com>
1524
1525 PR c/52023
1526 * c-parser.c (c_parser_alignas_specifier): Use
1527 c_sizeof_or_alignof_type instead of c_alignof.
1528 (c_parser_alignof_expression): Likewise, with min_alignof
1529 parameter depending on alignof spelling used.
1530
edd28054
MP
15312013-12-04 Marek Polacek <polacek@redhat.com>
1532
1533 PR c/54113
1534 * c-decl.c (start_function): Don't warn for missing prototype for
1535 inline functions.
1536
da0fc454
MP
15372013-12-03 Marek Polacek <polacek@redhat.com>
1538
1539 PR c/59351
1540 * c-decl.c (build_compound_literal): Allow compound literals with
1541 empty initial value.
1542
4c2ecab0
JM
15432013-12-02 Joseph Myers <joseph@codesourcery.com>
1544
1545 PR c/58235
1546 * c-typeck.c (build_modify_expr): Diagnose assignment to
1547 expression with array type.
1548
340baef7
JM
15492013-11-29 Joseph Myers <joseph@codesourcery.com>
1550
1551 PR c/42262
1552 * c-typeck.c (process_init_element): Do not treat a string as
1553 initializing a whole array when used with a designator for an
1554 individual element.
1555
6763b9f7
JM
15562013-11-29 Joseph Myers <joseph@codesourcery.com>
1557
1558 PR c/57574
1559 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1560 an inline function following a static declaration.
1561
e7bd1de1
JJ
15622013-11-28 Jakub Jelinek <jakub@redhat.com>
1563
1564 PR c/59310
1565 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1566 to p_name before calling c_parser_omp_teams instead of after.
1567 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1568 argument. Remove unused p_name variable.
1569
0136f8f0
AH
15702013-11-27 Aldy Hernandez <aldyh@redhat.com>
1571 Jakub Jelinek <jakub@redhat.com>
1572
1573 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1574 external_scope is NULL.
1575
241b71bb
TV
15762013-11-27 Tom de Vries <tom@codesourcery.com>
1577 Marc Glisse <marc.glisse@inria.fr>
1578
1579 PR c++/59032
1580 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1581
2fb9a547
AM
15822013-11-22 Andrew MacLeod <amacleod@redhat.com>
1583
1584 * c-typeck.c: Add required include files from gimple.h.
1585
8400e75e
DM
15862013-11-22 David Malcolm <dmalcolm@redhat.com>
1587
1588 * c-decl.c (define_label, shadow_tag_warned)
1589 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1590 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1591 (declspecs_add_type): Remove use of in_system_header macro.
1592 * c-parser.c (c_parser_unary_expression): Likewise.
1593 * c-typeck.c (store_init_value, process_init_element)
1594 (c_start_case): Likewise.
1595
1596 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1597 macro.
1598
1599 * c-parser.c (c_parser_set_source_position_from_token): Remove
1600 reference to in_system_header from comment.
1601
386b1f1f
RS
16022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1603
1604 * c-decl.c (grokdeclarator): Update comment to refer to
1605 tree_to_[su]hwi rather than tree_low_cst.
1606
ae7e9ddd
RS
16072013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1608
1609 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1610 tree_to_uhwi throughout.
1611
9439e9a1
RS
16122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1613
1614 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1615 throughout.
1616
9541ffee
RS
16172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1618
1619 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1620 throughout.
1621
c02065fc
AH
16222013-11-15 Aldy Hernandez <aldyh@redhat.com>
1623
1624 * c-parser.c (c_parser_cilk_simd): New.
1625 (c_parser_cilk_verify_simd): New.
1626 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1627 (c_parser_omp_for_loop): Add case for NE_EXPR.
1628 Set c_break_label for CILK_SIMD.
1629 (c_parser_cilk_clause_vectorlength): New.
1630 (c_parser_cilk_clause_linear): New.
1631 (c_parser_cilk_clause_name): New.
1632 (c_parser_cilk_all_clauses): New.
1633 * c-typeck.c (build_unary_op): Pass location argument to
1634 readonly_error.
1635 (build_modify_expr): Same.
1636 (build_asm_expr): Same.
1637 (c_finish_bc_stmt): Error on break/continue in loops.
1638
18f429e2
AM
16392013-11-14 Andrew MacLeod <amacleod@redhat.com>
1640
1641 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1642
d8a2d370
DN
16432013-11-14 Diego Novillo <dnovillo@google.com>
1644
1645 * c-decl.c: Include print-tree.h.
1646 Include stor-layout.h.
1647 Include varasm.h.
1648 Include attribs.h.
1649 Include stringpool.h.
1650 * c-lang.c: Include fold-const.h.
1651 * c-parser.c: Include stringpool.h.
1652 Include attribs.h.
1653 Include stor-layout.h.
1654 Include varasm.h.
1655 Include trans-mem.h.
1656 * c-typeck.c: Include stor-layout.h.
1657 Include trans-mem.h.
1658 Include varasm.h.
1659 Include stmt.h.
1660
38b7bc7f
JM
16612013-11-13 Joseph Myers <joseph@codesourcery.com>
1662
1663 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1664 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1665 __auto_type.
1666 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1667 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1668 RID_AUTO_TYPE.
1669 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1670 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1671 (c_parser_declarator, c_parser_direct_declarator_inner)
1672 (c_parser_parameter_declaration, c_parser_type_name): All callers
1673 changed.
1674 (c_parser_declaration_or_fndef): Handle declarations with type
1675 determined from the initializer.
1676
45b0be94
AM
16772013-11-12 Andrew MacLeod <amacleod@redhat.com>
1678
18f429e2 1679 * c-typeck.c: Include gimplify.h.
45b0be94 1680
582d9b50
JM
16812013-11-12 Joseph Myers <joseph@codesourcery.com>
1682
1683 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1684 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1685 comment.
1686 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1687 or _Thread_local as appropriate in diagnostics.
1688 (build_null_declspecs): Initialize ret->thread_gnu_p.
1689 (declspecs_add_scspec): Handle either __thread or _Thread_local
1690 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1691 pedantic. Do not disallow _Thread_local extern and _Thread_local
1692 static.
1693
267bac10
JM
16942013-11-07 Joseph Myers <joseph@codesourcery.com>
1695 Andrew MacLeod <amacleod@redhat.com>
1696
1697 * c-aux-info.c (gen_type): Handle atomic qualifier.
1698 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1699 qualifiers when compating types.
1700 (shadow_tag_warned): Handle atomic_p in declspecs.
1701 (quals_from_declspecs): Likewise.
1702 (start_decl): Use c_type_promotes_to when promoting argument
1703 types.
1704 (grokdeclarator): Handle _Atomic.
1705 (get_parm_info): Diagnose any qualifier on "void" as only
1706 parameter.
1707 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1708 comparing types. Use c_type_promotes_to when promoting argument
1709 types.
1710 (finish_function): Use c_type_promotes_to when promoting argument
1711 types.
1712 (build_null_declspecs): Handle atomic_p in declspecs.
1713 (declspecs_add_qual): Handle RID_ATOMIC.
1714 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1715 (c_token_starts_declspecs): Handle RID_ATOMIC.
1716 (c_parser_declspecs): Handle atomic type specifiers and
1717 qualifiers.
1718 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1719 from types of expressions with atomic type.
1720 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1721 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1722 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1723 (c_parser_statement_after_labels, c_parser_switch_statement)
1724 (c_parser_for_statement, c_parser_expr_no_commas)
1725 (c_parser_conditional_expression, c_parser_binary_expression)
1726 (c_parser_cast_expression, c_parser_unary_expression)
1727 (c_parser_postfix_expression)
1728 (c_parser_postfix_expression_after_primary, c_parser_expression):
1729 Use convert_lvalue_to_rvalue.
1730 (c_parser_expression_conv, c_parser_expr_list): Document
1731 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1732 (c_parser_objc_synchronized_statement): Use
1733 convert_lvalue_to_rvalue.
1734 (c_parser_objc_selector): Handle RID_ATOMIC.
1735 (c_parser_objc_receiver, c_parser_array_notation): Use
1736 convert_lvalue_to_rvalue.
1737 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1738 _Atomic (type-name).
1739 (struct c_declspecs): Add atomic_p field.
1740 (convert_lvalue_to_rvalue): Declare.
1741 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1742 corresponding atomic types.
1743 (qualify_type): Don't add _Atomic qualifiers from second argument.
1744 (comp_target_types): Do not allow _Atomic mismatches.
1745 (type_lists_compatible_p): Do not remove atomic qualifiers when
1746 comparing types.
1747 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1748 (build_atomic_assign): New functions.
1749 (build_unary_op): Use build_atomic_assign for atomic increment and
1750 decrement.
1751 (build_conditional_expr): Do not treat _Atomic void as a qualified
1752 version of void.
1753 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1754 (find_anonymous_field_with_type, convert_to_anonymous_field)
1755 (convert_for_assignment): Do not remove atomic qualifiers when
1756 comparing types.
1757 (digest_init): Do not accept initialization of arrays of atomic
1758 elements by string constants.
1759 (build_asm_expr): Use convert_lvalue_to_rvalue.
1760 (build_binary_op): Do not treat _Atomic void as a qualified
1761 version of void.
1762
0c249d4b
DD
17632013-11-06 DJ Delorie <dj@redhat.com>
1764
1765 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1766 both explicit and builtin, print the location of the explicit one.
1767
6d7f7e0a
TB
17682013-11-05 Tobias Burnus <burnus@net-b.de>
1769
1770 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1771 c_parser_omp_distribute, c_parser_omp_teams,
1772 c_parser_omp_target, c_parser_omp_declare): Handle
1773 -fopenmp-simd.
1774
b906f4ca
MP
17752013-11-03 Marek Polacek <polacek@redhat.com>
1776
1777 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1778
ee1d5a02
JJ
17792013-11-01 Jakub Jelinek <jakub@redhat.com>
1780
1781 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1782 check_dup_generic at the end, unless remove is true.
1783 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1784 remove = true;.
1785 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1786
5a9785fb
JJ
17872013-10-31 Jakub Jelinek <jakub@redhat.com>
1788
1789 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1790 with decl that is not pointer nor array.
1791
939b37da
BI
17922013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1793
1794 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1795 a spawning function is found.
1796 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1797 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1798 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1799 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1800 case.
1801 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1802 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1803 expr.
1804 (c_finish_return): Added a check to reject _Cilk_spawn in return
1805 expression.
1806 (build_cilk_spawn): New function.
1807 (build_cilk_sync): Likewise.
1808 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1809
d4af74d4
TB
18102013-10-27 Tobias Burnus <burnus@net-b.de>
1811
1812 PR other/33426
1813 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1814 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1815 (c_parser_statement_after_labels): Update calls.
1816
d73749df 18172013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1818
1819 PR other/33426
1820 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1821 Handle PRAGMA_IVDEP.
1822 (c_parser_statement_after_labels): Update call.
1823
f28aa681
MP
18242013-10-24 Marek Polacek <polacek@redhat.com>
1825
1826 * c-parser.c (c_parser_struct_declaration): Add a comment.
1827 (c_parser_declarator): Don't allow _Alignas here.
1828
0645c1a2
AM
18292013-10-17 Andrew MacLeod <amacleod@redhat.com>
1830
1831 * c-parser.c: Include omp-low.h.
1832 * c-typeck.c: Likewise.
1833
568a31f2
MP
18342013-10-17 Marek Polacek <polacek@redhat.com>
1835
1836 PR c/58267
1837 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1838 Document syntax of the array-declarator.
1839 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1840 are not permitted.
1841 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1842 (c_parser_struct_declaration): Likewise.
1843 (c_parser_declarator): Likewise.
1844 (c_parser_direct_declarator_inner): Likewise.
1845 (c_parser_parameter_declaration): Likewise.
1846 (c_parser_type_name): Likewise.
1847
acf0174b
JJ
18482013-10-11 Jakub Jelinek <jakub@redhat.com>
1849
1850 * c-lang.h (current_omp_declare_target_attribute): New extern
1851 decl.
1852 * c-parser.c: Include c-lang.h.
1853 (struct c_parser): Change tokens to c_token *.
1854 Add tokens_buf field. Change tokens_avail type to unsigned int.
1855 (c_parser_consume_token): If parser->tokens isn't
1856 &parser->tokens_buf[0], increment parser->tokens.
1857 (c_parser_consume_pragma): Likewise.
1858 (enum pragma_context): Add pragma_struct and pragma_param.
1859 (c_parser_external_declaration): Adjust
1860 c_parser_declaration_or_fndef caller.
1861 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1862 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1863 Adjust recursive call.
1864 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1865 of pragma_external.
1866 (c_parser_parameter_declaration): Use pragma_param instead of
1867 pragma_external.
1868 (c_parser_compound_statement_nostart, c_parser_label,
1869 c_parser_for_statement): Adjust
1870 c_parser_declaration_or_fndef callers.
1871 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1872 it through to c_parser_conditional_expression.
1873 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1874 pass it through to c_parser_binary_expression. Adjust recursive
1875 call.
1876 (c_parser_binary_expression): Remove prec argument, add
1877 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1878 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1879 binop matches it, use build2 instead of parser_build_binary_op.
1880 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1881 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1882 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1883 Handle pragma_struct and pragma_param the same as pragma_external.
1884 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1885 (c_parser_omp_variable_list): Parse array sections for
1886 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1887 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1888 (c_parser_omp_clause_reduction): Handle user defined reductions.
1889 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1890 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1891 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1892 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1893 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1894 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1895 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1896 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1897 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1898 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1899 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1900 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1901 (c_parser_omp_for_loop): Add CODE argument, pass it through
1902 to c_finish_omp_for. Change last argument to cclauses,
1903 and adjust uses to grab parallel clauses from the array of all
1904 the split clauses. Adjust c_parser_binary_expression,
1905 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1906 (omp_split_clauses): New function.
1907 (c_parser_omp_simd): New function.
1908 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1909 Allow the function to be called also when parsing combined constructs,
1910 and call c_parser_omp_simd when parsing for simd.
1911 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1912 #pragma omp section, require exactly one structured-block instead of
1913 sequence of statements.
1914 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1915 Allow the function to be called also when parsing combined constructs.
1916 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1917 Allow the function to be called also when parsing combined
1918 constructs.
1919 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1920 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1921 c_parser_omp_teams, c_parser_omp_target_data,
1922 c_parser_omp_target_update, c_parser_omp_target,
1923 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1924 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1925 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1926 (c_parser_omp_construct): Add p_name and mask vars. Handle
1927 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1928 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1929 and c_parser_omp_sections callers.
1930 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1931 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1932 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1933 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1934 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1935 OMP_CLAUSE_DEPEND.
1936 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1937 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1938 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1939 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1940 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1941 * c-typeck.c: Include tree-inline.h.
1942 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1943 handle_omp_array_sections_1, handle_omp_array_sections,
1944 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1945 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1946 user defined reductions.
1947 (c_tree_equal): New function.
1948 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1949 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1950 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1951 c_check_omp_declare_reduction_r): New prototypes.
1952 * c-decl.c (current_omp_declare_target_attribute): New variable.
1953 (c_decl_attributes): New function.
1954 (start_decl, start_function): Use it instead of decl_attributes.
1955 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1956 c_omp_reduction_decl, c_omp_reduction_lookup,
1957 c_check_omp_declare_reduction_r): New functions.
1958
0a6c2227
TT
19592013-09-25 Tom Tromey <tromey@redhat.com>
1960
1961 * Make-lang.in (c/gccspec.o): Remove.
1962 (CFLAGS-c/gccspec.o): New variable.
1963 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1964 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1965 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1966
f3bc55f0
TT
19672013-09-25 Tom Tromey <tromey@redhat.com>
1968
1969 * Make-lang.in (c/gccspec.o): Don't use subshell.
1970
a24d975c
MP
19712013-09-18 Marek Polacek <polacek@redhat.com>
1972
1973 PR sanitize/58443
1974 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1975 Remove unnecessary check.
1976
ce6923c5
MP
19772013-09-18 Marek Polacek <polacek@redhat.com>
1978
1979 PR sanitizer/58411
1980 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1981 no_sanitize_undefined attribute.
1982
a1e51df9
KT
19832013-09-13 Kai Tietz <ktietz@redhat.com>
1984
1985 PR target/57848
1986 * c-decl.c (c_builtin_function_ext_scope): Remove
1987 wrong assumption that it is never called on prexisting
1988 symbol.
1989
0af94e6f
JR
19902013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1991
1992 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1993
20059c8b
GDR
19942013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1995
1996 * c-objc-common.c (c_tree_printer): Tidy.
1997
de5a5fa1
MP
19982013-08-30 Marek Polacek <polacek@redhat.com>
1999
2000 * c-typeck.c (build_binary_op): Add division by zero and shift
2001 instrumentation.
2002
2531a1d9 20032013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2004 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2005
6e2bcc98 2006 PR c/35649
2531a1d9
JR
2007 * c-typeck.c (c_common_type): Prefer double_type_node over
2008 other REAL_TYPE types with the same precision.
2009 (convert_arguments): Likewise.
2010
025311c4
GDR
20112013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2012
2013 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2014 (c_initialize_diagnostics): Call a destructor for the early printer.
2015
da6ca2b5
GDR
20162013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2017
2018 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2019 printer initialization.
2020
318cda85 20212013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2022
318cda85
BI
2023 PR c/57490
2024 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2025 check for truth values.
2026 (expand_array_notation_exprs): Added truth values case. Removed an
2027 unwanted else. Added for-loop to walk through subtrees in default
2028 case.
2029
b066401f
GDR
20302013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2031
2032 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2033
fb48aadc
JM
20342013-07-23 Joseph Myers <joseph@codesourcery.com>
2035
2036 * c-parser.c (struct c_generic_association): Fix typo.
2037
433cc7b0
TT
20382013-07-23 Tom Tromey <tromey@redhat.com>
2039 Joseph Myers <joseph@codesourcery.com>
2040
2041 * c-parser.c (struct c_generic_association): New.
2042 (c_generic_association_d): New typedef.
2043 (c_parser_generic_selection): New function.
2044 (c_parser_postfix_expression): Handle RID_GENERIC.
2045
26d40c3d
JM
20462013-07-13 Jason Merrill <jason@redhat.com>
2047
2048 PR c++/57793
2049 * c-decl.c (finish_struct): Check for too-large class.
2050
ecdbd01a 20512013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2052
2053 PR c/57821
2054 * c-typeck.c (set_init_index): When folding, check for index overflow.
2055
1141ed3f
BI
20562013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2057
2058 * c-parser.c (c_parser_array_notation): Removed rejection of array
2059 notations in an array of function pointers.
2060
713b46fa
BI
20612013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2062
2063 * c-array-notation.c (make_triplet_val_inv): New function.
2064 (create_cmp_incr): Likewise.
2065 (create_array_refs): Likewise.
2066 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2067 Also modularized common parts between functions and called the function.
2068 (build_array_notation_expr): Likewise.
2069 (fix_conditional_array_notations_1): Likewise.
2070 (fix_array_notation_expr): Likewise.
2071 (fix_array_notation_call_expr): Likewise.
2072
92f20202
MP
20732013-06-18 Marek Polacek <polacek@redhat.com>
2074
2075 PR c/57630
2076 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2077
73a23b06
BI
20782013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2079
2080 * c-array-notation.c (build_array_notation_expr): Reject array notation
2081 mismatch between LHS and RHS even inside a call_expr. Also, removed
2082 a couple while statements that were dead code.
2083
00b8517d
BI
20842013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2085
2086 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2087 excessive precision expressions in function parameters. Also removed
2088 couple unwanted while statements.
2089
1509bdda
BI
20902013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2091
2092 * c-array-notation.c (expand_array_notation_exprs): Added
2093 ARRAY_NOTATION_REF case.
2094
d60f1706
BI
20952013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2096
2097 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2098 function to c-family/array-notation-common.c.
2099 (is_cilkplus_reduce_builtin): Likewise.
2100 (find_rank): Likewise.
2101 (extract_array_notation_exprs): Likewise.
2102 (replace_array_notations): Likewise.
2103 (find_inv_trees): Likewise.
2104 (replace_inv_trees): Likewise.
2105 (contains_array_notation_expr): Likewise.
2106 (find_correct_array_notation_type): Likewise.
2107 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2108 (struct inv_list): Moved this to c-family/array-notation-common.c.
2109 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2110
6d6efbb3
BI
21112013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2112
2113 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2114 reduction functions outside the for-loop. Added a check if the fundecl
2115 is non-NULL. Finally, removed an unwanted if-statement, and made the
2116 body unconditional.
2117
25c22937
BI
21182013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2119
2120 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2121 condition of the if-statement matches the rank of else-block and then-
2122 block when array notations are used.
2123 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2124 expression after the entire function body is parsed.
2125 (c_parser_expr_no_commas): Delayed creating array notation expressions
2126 to the end of function parsing.
2127 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2128 whole if-statement instead of just the condition.
2129 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2130
edd25645
BI
21312013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2132
2133 PR c/57474
2134 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2135 array to NULL_TREE if they are unused. Also added a check for the
2136 field to be NULL before its fields are used in future.
2137
065ce7f1
RO
21382013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2139
2140 PR bootstrap/57450
2141 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2142 (build_array_notation_expr): Likewise.
2143
36536d79
BI
21442013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2145
2146 * c-typeck.c (build_array_ref): Added a check to see if array's
2147 index is greater than one. If true, then emit an error.
2148 (build_function_call_vec): Exclude error reporting and checking
2149 for builtin array-notation functions.
2150 (convert_arguments): Likewise.
2151 (c_finish_return): Added a check for array notations as a return
2152 expression. If true, then emit an error.
2153 (c_finish_loop): Added a check for array notations in a loop
2154 condition. If true then emit an error.
2155 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2156 (build_binary_op): Added a check for array notation expr inside
2157 op1 and op0. If present, we call another function to find correct
2158 type.
2159 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2160 * c-parser.c (c_parser_compound_statement): Check if array
2161 notation code is used in tree, if so, then transform them into
2162 appropriate C code.
2163 (c_parser_expr_no_commas): Check if array notation is used in LHS
2164 or RHS, if so, then build array notation expression instead of
2165 regular modify.
2166 (c_parser_postfix_expression_after_primary): Added a check for
2167 colon(s) after square braces, if so then handle it like an array
2168 notation. Also, break up array notations in unary op if found.
2169 (c_parser_direct_declarator_inner): Added a check for array
2170 notation.
2171 (c_parser_compound_statement): Added a check for array notation in
2172 a stmt. If one is present, then expand array notation expr.
2173 (c_parser_if_statement): Likewise.
2174 (c_parser_switch_statement): Added a check for array notations in
2175 a switch statement's condition. If true, then output an error.
2176 (c_parser_while_statement): Similarly, but for a while.
2177 (c_parser_do_statement): Similarly, but for a do-while.
2178 (c_parser_for_statement): Similarly, but for a for-loop.
2179 (c_parser_unary_expression): Check if array notation is used in a
2180 pre-increment or pre-decrement expression. If true, then expand
2181 them.
2182 (c_parser_array_notation): New function.
2183 * c-array-notation.c: New file.
2184 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2185
cd192ccc
MS
21862013-05-23 Mike Stump <mikestump@comcast.net>
2187
2188 * c-typeck.c (convert_for_assignment): Handle references to memory
2189 spaces better.
2190
427b248d
JM
21912013-05-16 Jason Merrill <jason@redhat.com>
2192
2193 * Make-lang.in (cc1$(exeext)): Use link mutex.
2194
44d90fe1
PC
21952013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2196
2197 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2198 to simply use OPT_Wpointer_arith.
2199 (build_unary_op): Likewise.
2200
4e7d7b3d
JJ
22012013-04-03 Jakub Jelinek <jakub@redhat.com>
2202
2203 PR c/19449
2204 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2205 argument. If set, or it temporarily for parsing of the first
2206 argument into force_folding_builtin_constant_p.
2207 (c_parser_postfix_expression): Adjust callers.
2208
839b422f
RB
22092013-03-21 Richard Biener <rguenther@suse.de>
2210
2211 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2212 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2213
2ee028f1
MP
22142013-02-12 Marek Polacek <polacek@redhat.com>
2215
2216 PR c/44938
2217 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2218 origtypes to NULL.
2219
8824edff
JJ
22202013-01-24 Jakub Jelinek <jakub@redhat.com>
2221
2222 PR c/56078
2223 * c-typeck.c (set_nonincremental_init_from_string): If
2224 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2225 returned false.
2226 (process_init_element): Likewise.
2227
eadd3d0d
JJ
22282012-12-20 Jakub Jelinek <jakub@redhat.com>
2229
2230 PR c++/55619
2231 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2232 argument, don't call default_function_array_conversion
2233 nor c_fully_fold here.
2234 (c_parser_asm_statement): Adjust callers.
2235 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2236 and outputs here, and call default_function_array_conversion
2237 on inputs that don't need to be addressable.
2238
f8a93a2e
JJ
22392012-12-18 Jakub Jelinek <jakub@redhat.com>
2240
2241 PR c/39464
2242 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2243 warning require that both c_common_unsigned_type as well as
2244 c_common_signed_type is the same for both mvl and mvr types.
2245
9771b263
DN
22462012-11-16 Diego Novillo <dnovillo@google.com>
2247
2248 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2249
2250 * c-common.c: Use new vec API in vec.h.
2251 * c-common.h: Likewise.
2252 * c-gimplify.c: Likewise.
2253 * c-pragma.c: Likewise.
2254 * c-pretty-print.c: Likewise.
2255 * c-pretty-print.h: Likewise.
2256 * c-semantics.c: Likewise.
2257 * c-decl.c: Likewise.
2258 * c-parser.c: Likewise.
2259 * c-tree.h: Likewise.
2260 * c-typeck.c: Likewise.
2261
880661a4
JW
22622012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2263
2264 PR c++/54930
2265 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2266
077d1abe
MLI
22672012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2268
2269 PR c/53066
2270 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2271 shadows a function, unless the variable is a function or a
2272 pointer-to-function.
2273
3a785c97
JJ
22742012-10-12 Jakub Jelinek <jakub@redhat.com>
2275
2276 PR c/54381
2277 * c-parser.c (struct c_tree_loc_pair): Removed.
2278 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2279 add location_t * and tree * arguments, fill in array of 3
2280 sizeof_arg trees and corresponding locs.
2281 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2282 c_parser_expr_list callers.
2283 (c_parser_postfix_expression_after_primary): Likewise. Pass
2284 array of 3 sizeof_arg trees and locs (corresponding to first
2285 3 arguments) to sizeof_pointer_memaccess_warning.
2286
703c8606
LC
22872012-10-09 Lawrence Crowl <crowl@google.com>
2288
2289 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2290 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2291 hash table.
2292
5d9de0d0
PC
22932012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2294
2295 PR c++/54194
2296 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2297 call.
2298
a212e43f
MG
22992012-10-09 Marc Glisse <marc.glisse@inria.fr>
2300
2301 PR c++/54427
2302 * c-typeck.c: Include c-common.h.
2303 (enum stv_conv): Moved to c-common.h.
2304 (scalar_to_vector): Moved to c-common.c.
2305 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2306 * Make-lang.in: c-typeck.c depends on c-common.h.
2307
3b78de56
AC
23082012-10-04 Arnaud Charlet <charlet@adacore.com>
2309
2310 * c-decl.c (c_write_global_declarations): Fix handling of
2311 -fdump-ada-spec*.
2312
78c60e3d
SS
23132012-09-30 Sharad Singhai <singhai@google.com>
2314
2315 * c-decl.c (c_write_global_declarations): Use a different method
2316 to determine if the dump has ben initialized.
2317
9f33203d
JM
23182012-09-14 Joseph Myers <joseph@codesourcery.com>
2319
2320 PR c/54552
2321 * c-typeck.c (c_cast_expr): When casting to a type requiring
2322 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2323 c_fully_fold first.
2324
a27d595d
JM
23252012-09-14 Joseph Myers <joseph@codesourcery.com>
2326
2327 PR c/54103
2328 * c-typeck.c (build_unary_op): Pass original argument of
2329 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2330 any C_MAYBE_CONST_EXPR, if it has integer operands.
2331 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2332 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2333 to c_objc_common_truthvalue_conversion, then remove any
2334 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2335 c_objc_common_truthvalue_conversion not
2336 c_common_truthvalue_conversion.
2337 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2338 call note_integer_operands for arguments with integer operands
2339 that are not integer constants.
2340
9feb29df
JJ
23412012-09-13 Jakub Jelinek <jakub@redhat.com>
2342
2343 PR c/54559
2344 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2345 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2346
d409320c
JJ
23472012-08-31 Jakub Jelinek <jakub@redhat.com>
2348
2349 PR c/54428
2350 * c-convert.c (convert): Don't call fold_convert_loc if
2351 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2352 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2353 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2354
6265d07c
JJ
23552012-08-24 Jakub Jelinek <jakub@redhat.com>
2356
2357 PR c/54355
2358 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2359 for nested and empty_ok arguments in the call to
2360 c_parser_declaration_or_fndef.
2361
1a4049e7
JJ
23622012-08-17 Jakub Jelinek <jakub@redhat.com>
2363
2364 * c-tree.h (c_last_sizeof_arg): Declare.
2365 * c-parser.c (struct c_tree_loc_pair): New type.
2366 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2367 non-NULL.
2368 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2369 (c_parser_postfix_expression_after_primary): Likewise. Call
2370 sizeof_pointer_memaccess_warning if needed.
2371 (sizeof_ptr_memacc_comptypes): New function.
2372 * c-typeck.c (c_last_sizeof_arg): New global variable.
2373 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2374
0229aee9
UB
23752012-07-24 Uros Bizjak <ubizjak@gmail.com>
2376
2377 * c-lang.h (lang_decl): Add variable_size GTY option.
2378
7ee2468b
SB
23792012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2380
2381 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2382 * Make-lang.in: Fix dependencies.
2383
d4a10d0a
SB
23842012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2385
2386 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2387 and add language Makefile hooks.
2388 * config-lang.in: New file.
2389 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2390 add the required "normal" config-lang.in rules.
2391 * c-lang.h: Moved from gcc/ to here.
2392 * c-tree.h: Likewise.
2393 * c-objc-common.c: Likewise.
2394 * c-objc-common.h: Likewise.
2395 * c-typeck.c: Likewise.
2396 * c-convert.c: Likewise.
2397 * c-lang.c: Likewise.
2398 * c-aux-info.c: Likewise.
2399 * c-errors.c: Likewise.
2400 * gccspec.c: Likewise.
2401 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2402 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2403\f
5624e564 2404Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2405
2406Copying and distribution of this file, with or without modification,
2407are permitted in any medium without royalty provided the copyright
2408notice and this notice are preserved.